Skip to content

Commit

Permalink
fix(generic): move split up again and put it inside try/except
Browse files Browse the repository at this point in the history
The fix in 997975c did help, but
sometimes the value *is* a tuple, but it contains an empty queryset.
Therefore we now try to split it in an try/except block and then test
the emptyness of `value`
  • Loading branch information
b1rger committed Feb 5, 2025
1 parent 7c6dc94 commit 543d6ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apis_core/generic/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ def field(self):
return IncludeExcludeField(super().field, required=self.extra["required"])

def filter(self, queryset, value):
if value:
try:
value, include_exclude = value
except ValueError:
pass
if value:
content_type = ContentType.objects.get_for_model(queryset.model)
try:
skoscollectioncontentobject = apps.get_model(
Expand Down

0 comments on commit 543d6ae

Please sign in to comment.