Commit 0568e8c6 authored by Morten Brekkevold's avatar Morten Brekkevold

Workaround for silly NAV API deficiency: Rooms cannot contain periods

parent 6d8f140e
......@@ -200,6 +200,12 @@ def clean_data(kind_data):
"satt i Kind:\n%s",
production_devices_by_name(no_nettinstallasjon))
# Workaround for silly NAV API deficiency: Rooms cannot contain periods
for device in kind_devices:
if device.room and '.' in device.room:
LOG.debug("Replacing '.' with '-' in room name %r", device.room)
device.room = device.room.replace('.', '-')
return {device.name: device for device in kind_devices
if device not in (invalid_names | no_nettinstallasjon)}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment