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

minor

parent b23442cc
No related branches found
No related tags found
No related merge requests found
......@@ -64,14 +64,19 @@ class AbstractCFood(object):
@staticmethod
# move to api?
def set_parents(entity, names):
parents = [p.name for p in entity.get_parents()]
for p in parents:
entity.remove_parent(p)
entity.parents.clear()
for n in names:
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
def find_existing(entity):
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