Skip to content

Commit

Permalink
Replace filter with iterate
Browse files Browse the repository at this point in the history
to make AnnotationValueQuery more robust
  • Loading branch information
gregorjerse committed Nov 6, 2024
1 parent 8a63504 commit fd790c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/resdk/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ def _fetch(self):
if missing:
# Get corresponding annotation field details in a single query and attach it to
# the values.
for field in self.resolwe.annotation_field.filter(id__in=missing.keys()):
for field in self.resolwe.annotation_field.filter(
id__in=missing.keys()
).iterate():
for value in missing[field.id]:
value._field = field
value._original_values["field"] = field._original_values
Expand Down

0 comments on commit fd790c4

Please sign in to comment.