Skip to content

Commit cbd152a

Browse files
authored
Merge pull request #596 from ISA-tools/isatools_materials_test_deprecation
Hid some PerformanceWarnings...
2 parents 68ed2c4 + 8976a8e commit cbd152a

File tree

6 files changed

+289
-234
lines changed

6 files changed

+289
-234
lines changed

isatools/database/models/ontology_annotation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ def to_sql(self, session):
8282
if oa:
8383
return oa
8484
term_source_id = self.term_source.to_sql(session) if self.term_source else None
85+
comments_objs = [c.to_sql(session) for c in self.comments]
86+
8587
oa = OntologyAnnotation(
8688
ontology_annotation_id=self.id,
8789
annotation_value=self.term,
8890
term_accession=self.term_accession,
8991
term_source_id=term_source_id.ontology_source_id if term_source_id else None,
90-
comments=[comment.to_sql() for comment in self.comments],
92+
comments=comments_objs,
9193
)
9294
session.add(oa)
9395
return oa

0 commit comments

Comments
 (0)