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

white spaces

parent c2c54a68
No related branches found
No related tags found
No related merge requests found
......@@ -53,23 +53,25 @@ class AbstractCFood(object):
@staticmethod
def find_existing(entity):
query_string = "FIND Record "+ entity.get_parents()[0].name
query_string += " with " + "and".join(["'" + p.name + "'='" + p.value +"'"
for p in entity.get_properties()])
query_string = "FIND Record " + entity.get_parents()[0].name
query_string += " with " + "and".join(["'" + p.name + "'='" + p.value + "'"
for p in entity.get_properties()])
print(query_string)
q = db.Query(query_string)
try:
r = q.execute(unique=True)
except TransactionError as er:
r = None
return r
class ExampleCFood(AbstractCFood):
def create_identifiables(self, filename, match):
entities = {}
entities["exp"] = db.Record()
#import IPython
#IPython.embed()
# IPython.embed()
entities["exp"].add_parent(name="Experiment")
entities["exp"].add_property(name="species", value=match.group)
......@@ -80,6 +82,7 @@ class ExampleCFood(AbstractCFood):
value=datetime.today().isoformat())
db.Container().extend(entities.values).update()
def get_parser():
parser = argparse.ArgumentParser(description=__doc__,
formatter_class=RawTextHelpFormatter)
......
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