-
Notifications
You must be signed in to change notification settings - Fork 171
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
Getting a weird error message when trying to create device type #471
Comments
It sounds like the request is being sent to NetBox twice, but I'm not sure why that would happen. |
Works for me (lines split for readability):
|
Used requests for that one part of my script since i have no idea why that error appears, if i just run: |
@mickmortensen Is this still an issue? |
When trying to execute the following code:
model = 'DCS-7280SR-48C6'
nb.dcim.device_types.create([{
"model": model,
"manufacturer": 3,
"slug": model.lower()
}])
I get the following error:
The request failed with code 400 Bad Request: [{'non_field_errors': ['The fields manufacturer, model must make a unique set.', 'The fields manufacturer, slug must make a unique set.']}]
But the object gets created in netbox, so what does the error mean?
The plan is to create device types on in a for loop, this is just an example which throws the same error.
Running pynetbox version 6.6.2 and Netbox version 3.2.3
The text was updated successfully, but these errors were encountered: