diff --git a/equipment/tables.py b/equipment/tables.py index a14d907..6daa83e 100644 --- a/equipment/tables.py +++ b/equipment/tables.py @@ -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)