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

ENH: allow datatype for set_property

parent 006f8481
No related branches found
No related tags found
No related merge requests found
......@@ -141,9 +141,13 @@ class AbstractCFood(object):
@staticmethod
# move to api?
def set_property(entity, prop, value):
def set_property(entity, prop, value, datatype=None):
AbstractCFood.remove_property(entity, prop)
entity.add_property(prop, value)
if datatype is not None:
entity.add_property(prop, value, datatype=datatype)
else:
entity.add_property(prop, value)
@staticmethod
def find_existing(entity):
......
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