Skip to content

Commit 67480ad

Browse files
author
stephanie
committed
update result creation
1 parent aa34a80 commit 67480ad

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

odm2api/ODM2/services/createService.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def createRelatedAction(self, relatedaction):
117117

118118
#send in any type of result object
119119
def createResult(self, result):
120+
if result.UUID is None:
121+
result.UUID = str(uuid.uuid1())
120122
self._session.add(result)
121123
self._session.commit()
122124
return result

odm2api/ODM2/services/updateService.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def updateResult(self, resultID, valuecount = None):
3636

3737
self._session.commit()
3838

39+
3940
def updateAction(self, actionID, begin=None, end=None):
4041
q = self._session.query(Actions).filter(Actions.ActionID == int(actionID))
4142
if begin:

0 commit comments

Comments
 (0)