hotfix: owner can be None
This commit is contained in:
parent
20fad42d6d
commit
7690c1a8ab
1 changed files with 2 additions and 1 deletions
|
@ -51,7 +51,8 @@ class EquipmentFilter(django_filters.FilterSet):
|
|||
if self.queryset is not None:
|
||||
for filter_ in self.filters.values():
|
||||
if filter_.queryset.model == Group:
|
||||
own_ids = [eq.owner.id for eq in self.queryset]
|
||||
own_ids = [eq.owner.id for eq in self.queryset
|
||||
if eq.owner is not None]
|
||||
filtre = Q(id__lt=0)
|
||||
for own_id in own_ids:
|
||||
filtre |= Q(id=own_id)
|
||||
|
|
Loading…
Reference in a new issue