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

MAINT: allow setting whether update shall be unique

parent 5eeb0924
No related branches found
No related tags found
No related merge requests found
......@@ -329,7 +329,7 @@ def assure_has_description(entity, description, to_be_updated=None,
def assure_has_parent(entity, parent, to_be_updated=None, verbosity=INFO,
force=False):
force=False, unique=True):
"""
Checks whether `entity` has a parent with name `parent`.
......@@ -367,9 +367,9 @@ def assure_has_parent(entity, parent, to_be_updated=None, verbosity=INFO,
# TODO find a better way then force?
if force:
entity.update(unique=False)
entity.update(unique=unique)
else:
guard.safe_update(entity, unique=False)
guard.safe_update(entity, unique=unique)
else:
to_be_updated.append(entity)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment