-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
Environment
- Python version: 3.6.9
- NetBox version: 2.10.1
Steps to Reproduce
- With debug enabled, make a REST API call for
/api/dcim/devices/and inspect the SQL queries being made.
Expected Behavior
Retrieval of ConfigContext data should be optimized per #4559.
Observed Behavior
ConfigContextQuerySetMixin's get_queryset() method is not called because DeviceViewSet inherits first from CustomFieldModelViewSet, which already provides get_queryset() (from the base ViewSet class).
Reversing the order of these parent classes ensures that the optimization provided by ConfigContextQuerySetMixin takes effect.
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application