Explorar o código

Optimize contact lookup query

Alexander Haase hai 1 ano
pai
achega
effc23f5bb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/netbox/models/features.py

+ 1 - 1
netbox/netbox/models/features.py

@@ -376,7 +376,7 @@ class ContactsMixin(models.Model):
         filter = Q(
             object_type=ObjectType.objects.get_for_model(self),
             object_id__in=(
-                self.get_ancestors(include_self=True).values_list('pk', flat=True)
+                self.get_ancestors(include_self=True)
                 if (isinstance(self, NestedGroupModel) and inherited)
                 else [self.pk]
             ),