Import page raises exception when corresponding model has custom field with Type object or multiple objects #10209

Closed
opened 2025-12-29 21:28:21 +01:00 by adam · 1 comment
Owner

Originally created by @mwobst on GitHub (Sep 9, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.1.0

Python Version

3.10

Steps to Reproduce

This happens at any model having at least one custom field with Type = "Object" or "Multiple objects". As soon as you open the model’s import page, we get the Exception Field.__init__() got an unexpected keyword argument 'query_params'.

Example:

  1. Open […]/extras/custom-fields/add/
  2. Let’s use "VPN > Tunnel" as object type, "whatever" as name, "Object" as type and then "Circuits > Circuit" as Related object type (yeah, makes no sense but eh), then save.
  3. Open […]/vpn/tunnels/import/

Expected Behavior

The import form is properly rendered = displayed.

Observed Behavior

Upon the last step, the mentioned exception is raised.
(Note: Removing the custom field also "removes" the exception.)

OS: Ubuntu 22.04 LTS
Django version: 5.0.9

At our NetBox v4.0.11 instance, Django 5.0.9 is used as well but no such error occurs.

Originally created by @mwobst on GitHub (Sep 9, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.1.0 ### Python Version 3.10 ### Steps to Reproduce This happens at any model having at least one custom field with Type = "Object" or "Multiple objects". As soon as you open the model’s import page, we get the Exception `Field.__init__() got an unexpected keyword argument 'query_params'`. Example: 1. Open […]/extras/custom-fields/add/ 2. Let’s use "VPN > Tunnel" as object type, "whatever" as name, "Object" as type and then "Circuits > Circuit" as Related object type (yeah, makes no sense but eh), then save. 3. Open […]/vpn/tunnels/import/ ### Expected Behavior The import form is properly rendered = displayed. ### Observed Behavior Upon the last step, the mentioned exception is raised. (Note: Removing the custom field also "removes" the exception.) OS: Ubuntu 22.04 LTS Django version: 5.0.9 At our NetBox v4.0.11 instance, Django 5.0.9 is used as well but no such error occurs.
adam added the type: bug label 2025-12-29 21:28:21 +01:00
adam closed this issue 2025-12-29 21:28:21 +01:00
Author
Owner

@arthanson commented on GitHub (Sep 9, 2024):

dupe of #17354

@arthanson commented on GitHub (Sep 9, 2024): dupe of #17354
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10209