-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inventory items update error 'The fields device, parent, name must make a unique set.' via api #16165
Comments
Moving item with identical names to one device works in gui. |
Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.0.2 using raw API requests. Please re-confirm the reported behavior using raw API queries on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data. |
I updated issue with raw API requests. Also attached file with output. |
I am unable to reproduce this following the steps provided under normal circumstances. |
I just made clean install and get the same issue with API. Could you please show how you move inventory items to one device with API? |
Do I understand correctly that you are able to make API calls to change 2 items with same name to one device? |
I think i found the commit that introduced this behavior. After the discussion it should be reverted. But it seems that in case of API it remained.
are still in device_components.py. Could you check this please? |
I have commented lines 1256 - 1261 in dcim/models/device_components.py and API started to work as expected, but i don't know if some migrations are required. |
requests.txt
Deployment Type
Self-hosted
NetBox Version
v4.0.2
Python Version
3.11
Steps to Reproduce
same for item_id2 (5493)
Expected Behavior
receive updated inventory items
Observed Behavior
second PATCH request returns:
The text was updated successfully, but these errors were encountered: