Skip to content

Commit ca0e94f

Browse files
author
sreeder
committed
merge
2 parents 23c4e14 + 4cac7d9 commit ca0e94f

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

odmtools/odmdata/memory_database.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +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
82-
return self.results_annotations
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+
8387

8488
def getDataValues(self):
8589
# TODO: fix me! this commit location is only temoporarily. should be flushing so that we can restore

0 commit comments

Comments
 (0)