Skip to content

Commit f82423b

Browse files
author
stephanie
committed
fix merge commits
2 parents 855cf17 + 4cac7d9 commit f82423b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

odmtools/odmdata/memory_database.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,16 @@ def getDataValuesDF(self):
7474
logging.debug("done updating memory dataframe")
7575
return self.df
7676

77-
def get_annotations(self):
78-
result_id = self.df.resultid[0]
77+
78+
def get_annotations(self, query_db_again=False):
79+
# self.mem_service._session.commit()
7980
setSchema(self.series_service._session_factory.engine)
80-
annotation = self.series_service.get_annotations_by_result(resultid=result_id)
81-
self.results_annotations = annotation
81+
if self.results_annotations is None or query_db_again:
82+
result_id = self.df.resultid[0]
83+
annotation = self.series_service.get_annotations_by_result(resultid=result_id)
84+
self.results_annotations = annotation
85+
86+
8287
return self.results_annotations
8388

8489
def getDataValues(self):

0 commit comments

Comments
 (0)