Skip to content

Commit

Permalink
fix: a bug in serializer showing full list
Browse files Browse the repository at this point in the history
  • Loading branch information
kaliif committed Oct 23, 2024
1 parent 0769b5e commit 88e45d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions viewer/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ class Meta:

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Limit the queryset to only identifiers related to this compound
if self.instance:
# limit the identifiers queryset to only the onses related to this compound
if self.instance and isinstance(self.instance, models.Compound):
self.fields[
'current_identifier'
].queryset = self.instance.all_identifiers.all()
Expand Down

0 comments on commit 88e45d9

Please sign in to comment.