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
Branches
Tags
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.
Please register or to comment