django.core.exceptions.FieldError after upgrade #11353

Closed
opened 2025-12-29 21:44:05 +01:00 by adam · 7 comments
Owner

Originally created by @IliasTsarouchas on GitHub (Jul 8, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.3.3

Python Version

3.10

Steps to Reproduce

Upgrade from 4.0.11

login with a restricted user resulting in:

Cannot resolve keyword 'site' into field. Choices are: _location, _location_id, _region, _region_id, _site, _site_group, _site_group_id, _site_id, bookmarks, comments, contacts, created, custom_field_data, description, devices, group, group_id, id, journal_entries, last_updated, name, scope, scope_id, scope_type, scope_type_id, status, subscriptions, tagged_items, tags, tenant, tenant_id, type, type_id, virtual_machines, vlan_groups

Python version: 3.10.12
NetBox version: 4.3.3
Plugins: None installed

We have multiple sites and the users are restricted so they can only modify their site's devices and view the devices of other sites.

Did the syntax change?

Also if the user manages to reach a device he is allowed to modify the edit button errors. Thanks in advance for your help. If you need more informations - please advice and I ll provide anything needed.

Expected Behavior

The user should be able to login and modify devices and objects he has access to.

Observed Behavior

django error

Originally created by @IliasTsarouchas on GitHub (Jul 8, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.3.3 ### Python Version 3.10 ### Steps to Reproduce Upgrade from 4.0.11 login with a restricted user resulting in: Cannot resolve keyword 'site' into field. Choices are: _location, _location_id, _region, _region_id, _site, _site_group, _site_group_id, _site_id, bookmarks, comments, contacts, created, custom_field_data, description, devices, group, group_id, id, journal_entries, last_updated, name, scope, scope_id, scope_type, scope_type_id, status, subscriptions, tagged_items, tags, tenant, tenant_id, type, type_id, virtual_machines, vlan_groups Python version: 3.10.12 NetBox version: 4.3.3 Plugins: None installed We have multiple sites and the users are restricted so they can only modify their site's devices and view the devices of other sites. Did the syntax change? Also if the user manages to reach a device he is allowed to modify the edit button errors. Thanks in advance for your help. If you need more informations - please advice and I ll provide anything needed. ### Expected Behavior The user should be able to login and modify devices and objects he has access to. ### Observed Behavior django error
adam added the netbox label 2025-12-29 21:44:05 +01:00
adam closed this issue 2025-12-29 21:44:05 +01:00
Author
Owner

@IliasTsarouchas commented on GitHub (Jul 8, 2025):

We had multiple object types (ex. in virtualisation there were two active: Virtualization > Cluster and Virtualization >Virtual Machine active. Removing the first and saving removed the django errors. Is it possible that in earlier versions multiple object types could be chosen for the same constraints? However - thanks in advance for your checking and for providing such an excellent product.

@IliasTsarouchas commented on GitHub (Jul 8, 2025): We had multiple object types (ex. in virtualisation there were two active: Virtualization > Cluster and Virtualization >Virtual Machine active. Removing the first and saving removed the django errors. Is it possible that in earlier versions multiple object types could be chosen for the same constraints? However - thanks in advance for your checking and for providing such an excellent product.
Author
Owner

@arthanson commented on GitHub (Jul 8, 2025):

@IliasTsarouchas Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken.

You mentioned you have constraints for the user but don't specify what exactly those are. Can you please specify what constraints you are talking about (what screens or Config params you used to set them) and what values you used. We need to know how to recreate those exact conditions to see if we can reproduce the error.

@arthanson commented on GitHub (Jul 8, 2025): @IliasTsarouchas Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. You mentioned you have constraints for the user but don't specify what exactly those are. Can you please specify what constraints you are talking about (what screens or Config params you used to set them) and what values you used. We need to know how to recreate those exact conditions to see if we can reproduce the error.
Author
Owner

@IliasTsarouchas commented on GitHub (Jul 9, 2025):

Thanks for your support and your kind and patient answer. Although we have solved the problem on our side, I will happily try to provide everything needed to make this reproducable. Therefore I need to restore the vm to a state before the upgrade so I can exactly provide the informations needed. Will come back asap to give detailed informations. Thanks again for this great procuct - and keep up the good work.

@IliasTsarouchas commented on GitHub (Jul 9, 2025): Thanks for your support and your kind and patient answer. Although we have solved the problem on our side, I will happily try to provide everything needed to make this reproducable. Therefore I need to restore the vm to a state before the upgrade so I can exactly provide the informations needed. Will come back asap to give detailed informations. Thanks again for this great procuct - and keep up the good work.
Author
Owner

@IliasTsarouchas commented on GitHub (Jul 9, 2025):

After review of the old netbox version 4.0.11 I can confirm that under Admin/Permissions we had the following active:

Object types: Virtualization > Cluster and Virtualization > Virtual Machine

Constraints: {"site": "5"} - as an example

We have multiple Groups configured with LDAP / Active Directory Group assignements each.

Our goal is that users can view/see other sites' devices and virtual machines, but only modify devices in their assigned site where they are responsible to.

However after upgrade to 4.3.3 our supporter started to report the forementioned django errors because of the multiple (Cluster and Virtual Machine) object types chosen in the pulldown menu.

In the actual 4.3.3 version I checked and you cant successfully save with multiple Object types - under Virtualization marked. Tested and on the 4.0.11 version it is possible to successfully save if you have Cluster and Virtual Machine active.

So removing Cluster from Object types - thus only having Virtual Machine chosen/active solved the problem for us.

See pictures attached for further clarification.

Image
Image

Let me know if you need further informations.

@IliasTsarouchas commented on GitHub (Jul 9, 2025): After review of the old netbox version 4.0.11 I can confirm that under Admin/Permissions we had the following active: Object types: Virtualization > Cluster **and** Virtualization > Virtual Machine Constraints: {"site": "5"} - as an example We have multiple Groups configured with LDAP / Active Directory Group assignements each. Our goal is that users can view/see other sites' devices and virtual machines, but only modify devices in their assigned site where they are responsible to. However after upgrade to 4.3.3 our supporter started to report the forementioned django errors because of the multiple (Cluster and Virtual Machine) object types chosen in the pulldown menu. In the actual 4.3.3 version I checked and you cant successfully save with multiple Object types - under Virtualization marked. Tested and on the 4.0.11 version it is possible to successfully save if you have Cluster and Virtual Machine active. So removing Cluster from Object types - thus only having Virtual Machine chosen/active solved the problem for us. See pictures attached for further clarification. ![Image](https://github.com/user-attachments/assets/6a223c0f-afc5-4cb1-b4f5-d8e3ff0205a5) ![Image](https://github.com/user-attachments/assets/6ecc6309-4e1a-44e5-9713-9bb5a5d7b2d5) Let me know if you need further informations.
Author
Owner

@IliasTsarouchas commented on GitHub (Jul 9, 2025):

One last question if I may:

the supported distro is still ubuntu 22.04. When is it planed to have an upgrade path to the actual LTS release and will an inplace upgrade work, or will we have to reinstall backup/restore ? And will it also be a supported setup on debian 12?

@IliasTsarouchas commented on GitHub (Jul 9, 2025): One last question if I may: the supported distro is still ubuntu 22.04. When is it planed to have an upgrade path to the actual LTS release and will an inplace upgrade work, or will we have to reinstall backup/restore ? And will it also be a supported setup on debian 12?
Author
Owner

@jeremystretch commented on GitHub (Jul 10, 2025):

So removing Cluster from Object types - thus only having Virtual Machine chosen/active solved the problem for us.

Sounds like this was addressed by updating your defined constraints.

One last question if I may:

Please open a new discussion for other questions, as we try to keep the discussion within each bug report pertinent to the reported issue

@jeremystretch commented on GitHub (Jul 10, 2025): > So removing Cluster from Object types - thus only having Virtual Machine chosen/active solved the problem for us. Sounds like this was addressed by updating your defined constraints. > One last question if I may: Please open a [new discussion](https://github.com/netbox-community/netbox/discussions/new/choose) for other questions, as we try to keep the discussion within each bug report pertinent to the reported issue
Author
Owner

@IliasTsarouchas commented on GitHub (Jul 11, 2025):

it was addressed by updating removing the second object type (Cluster) - not the constraints were the problem, but the fact that I could choose multiple object types and successfully save in 4.0.11 while only one object type is allowed in 4.3.3. And if this is correct in both cases then at least while migrating there might have been needed a hint/conversion or anything, if I am not completely mistaken.

@IliasTsarouchas commented on GitHub (Jul 11, 2025): it was addressed by updating removing the second object type (Cluster) - not the constraints were the problem, but the fact that I could choose multiple object types and successfully save in 4.0.11 while only one object type is allowed in 4.3.3. And if this is correct in both cases then at least while migrating there might have been needed a hint/conversion or anything, if I am not completely mistaken.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11353