Commit 84c6dfb8 authored by Cédric Crettaz's avatar Cédric Crettaz 🖥
Browse files

Correction of a bug in the DCA Carouge fountain.

parent 99b43907
......@@ -98,7 +98,11 @@ def get_ngsiv2_typed_description(val, force_date_modified=None):
new_val = re.sub(pat, '', val)
app.logger.warning("Special char(s) deleted. This <{}> turned into this <{}>".format(val, new_val))
ret.update({'type': 'Text', 'value': new_val})
# Avoid the date and time as text
if val.endswith('Z'):
ret.update({'type': 'DateTime', 'value': new_val})
ret.update({'type': 'Text', 'value': new_val})
elif isinstance(val, datetime.datetime):
# replace +00:00 is the same as Z but Orion doesnt like it :/
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