mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 21:18:16 -06:00
Remove annotations cleanup logic from BriefModeMixin
This commit is contained in:
parent
701f461225
commit
a71c7e4677
@ -52,19 +52,6 @@ class BriefModeMixin:
|
|||||||
|
|
||||||
return self.serializer_class
|
return self.serializer_class
|
||||||
|
|
||||||
def get_queryset(self):
|
|
||||||
qs = super().get_queryset()
|
|
||||||
|
|
||||||
if self.brief:
|
|
||||||
serializer_class = self.get_serializer_class()
|
|
||||||
|
|
||||||
# Clear any annotations for fields not present on the nested serializer
|
|
||||||
for annotation in list(qs.query.annotations.keys()):
|
|
||||||
if annotation not in serializer_class().fields:
|
|
||||||
qs.query.annotations.pop(annotation)
|
|
||||||
|
|
||||||
return qs
|
|
||||||
|
|
||||||
|
|
||||||
class CustomFieldsMixin:
|
class CustomFieldsMixin:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user