VLANGroupFilterSet, filter_scope not fully specified ContentType #7551

Closed
opened 2025-12-29 20:25:04 +01:00 by adam · 1 comment
Owner

Originally created by @milonline-eu on GitHub (Jan 24, 2023).

NetBox version

v3.4.3

Python version

3.8

Steps to Reproduce

  1. add django.contrib.sites into INSTALLED_APPS
  2. /ipam/vlan-groups/ filter returns 500: MultipleObjectsReturned at /api/ipam/vlan-groups/ get() returned more than one ContentType -- it returned 2!

Expected Behavior

vlan-group filter works and do not generate 500 error: MultipleObjectsReturned at /api/ipam/vlan-groups/ get() returned more than one ContentType -- it returned 2!

Bug pinpointed to this line:
504800a7db/netbox/ipam/filtersets.py (L781)

app_name should be specified together with the model name

Observed Behavior

error 500: MultipleObjectsReturned at /api/ipam/vlan-groups/ get() returned more than one ContentType -- it returned 2!

Originally created by @milonline-eu on GitHub (Jan 24, 2023). ### NetBox version v3.4.3 ### Python version 3.8 ### Steps to Reproduce 1. add django.contrib.sites into INSTALLED_APPS 2. /ipam/vlan-groups/ filter returns 500: MultipleObjectsReturned at /api/ipam/vlan-groups/ get() returned more than one ContentType -- it returned 2! ### Expected Behavior vlan-group filter works and do not generate 500 error: MultipleObjectsReturned at /api/ipam/vlan-groups/ get() returned more than one ContentType -- it returned 2! Bug pinpointed to this line: https://github.com/netbox-community/netbox/blob/504800a7db0bc0d7535a7b235c9d0f2aac15c84a/netbox/ipam/filtersets.py#L781 app_name should be specified together with the model name ### Observed Behavior error 500: MultipleObjectsReturned at /api/ipam/vlan-groups/ get() returned more than one ContentType -- it returned 2!
adam closed this issue 2025-12-29 20:25:06 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 24, 2023):

add django.contrib.sites into INSTALLED_APPS

We cannot accept bug reports which entail modifying the core code base. If you want to modify NetBox, you are responsible for addressing any problems arising from the changes you make.

@jeremystretch commented on GitHub (Jan 24, 2023): > add django.contrib.sites into INSTALLED_APPS We cannot accept bug reports which entail modifying the core code base. If you want to modify NetBox, you are responsible for addressing any problems arising from the changes you make.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7551