mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-26 18:58:54 +02:00
optimize
This commit is contained in:
@@ -26,7 +26,7 @@ class NetBoxTaggableManager(_TaggableManager):
|
|||||||
vals = set(
|
vals = set(
|
||||||
self.through._default_manager.using(db)
|
self.through._default_manager.using(db)
|
||||||
.values_list("tag_id", flat=True)
|
.values_list("tag_id", flat=True)
|
||||||
.filter(**self._lookup_kwargs())
|
.filter(**self._lookup_kwargs(), tag_id__in=new_ids)
|
||||||
)
|
)
|
||||||
new_ids -= vals
|
new_ids -= vals
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user