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

minor

parent 73f72995
No related branches found
No related tags found
No related merge requests found
...@@ -64,14 +64,19 @@ class AbstractCFood(object): ...@@ -64,14 +64,19 @@ class AbstractCFood(object):
@staticmethod @staticmethod
# move to api? # move to api?
def set_parents(entity, names): def set_parents(entity, names):
parents = [p.name for p in entity.get_parents()] entity.parents.clear()
for p in parents:
entity.remove_parent(p)
for n in names: for n in names:
entity.add_parent(get_entity(n)) entity.add_parent(get_entity(n))
@staticmethod
# move to api?
def set_property(entity, name, value):
if entity.get_property(name) is not None:
entity.remove_property(name)
entity.add_property(get_entity(name), value=value)
@staticmethod @staticmethod
def find_existing(entity): def find_existing(entity):
query_string = "FIND Record " + entity.get_parents()[0].name query_string = "FIND Record " + entity.get_parents()[0].name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment