Skip to content
Snippets Groups Projects
Commit 39d09f07 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: name was not properly treated

parent 12d9f011
No related branches found
No related tags found
1 merge request!13FIX: name was not properly treated
Pipeline #14048 failed
...@@ -640,6 +640,23 @@ def assure_has_property(entity, name, value, to_be_updated=None, ...@@ -640,6 +640,23 @@ def assure_has_property(entity, name, value, to_be_updated=None,
"entity {}".format(value, entity.id)) "entity {}".format(value, entity.id))
entity.description = value entity.description = value
if to_be_updated is None:
get_ids_for_entities_with_names([entity])
guard.safe_update(entity, unique=False)
else:
to_be_updated.append(entity)
return
elif name.lower() == "name":
if entity.name == value:
return
else:
logger.debug("UPDATE: Setting name of entity {}: {}".format(
entity.id, value))
entity.name = value
if to_be_updated is None: if to_be_updated is None:
get_ids_for_entities_with_names([entity]) get_ids_for_entities_with_names([entity])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment