Duplicate ip address using API #1046

Closed
opened 2025-12-29 16:28:16 +01:00 by adam · 3 comments
Owner

Originally created by @Atoms on GitHub (Jun 19, 2017).

**Python version: 3.4
**NetBox version: 2.0.7

Have configured ENFORCE_GLOBAL_UNIQUE as True, in Frontend ip address is checked and cannot add duplicate ip_addresses, but using API you can still add duplicate ip address.

Originally created by @Atoms on GitHub (Jun 19, 2017). **Python version: 3.4 **NetBox version: 2.0.7 Have configured ENFORCE_GLOBAL_UNIQUE as True, in Frontend ip address is checked and cannot add duplicate ip_addresses, but using API you can still add duplicate ip address.
adam added the type: bug label 2025-12-29 16:28:16 +01:00
adam closed this issue 2025-12-29 16:28:16 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 6, 2017):

The issue here is that Django REST Framework no longer enforces a model's validation through clean(). We'll need to either duplicate the validation logic in the serializer, or (more likely) call clean() from the serializer.

@jeremystretch commented on GitHub (Jul 6, 2017): The issue here is that Django REST Framework [no longer enforces a model's validation](http://www.django-rest-framework.org/topics/3.0-announcement/#differences-between-modelserializer-validation-and-modelform) through `clean()`. We'll need to either duplicate the validation logic in the serializer, or (more likely) call `clean()` from the serializer.
Author
Owner

@jeremystretch commented on GitHub (Jul 6, 2017):

Fixed in 1f9806a

@jeremystretch commented on GitHub (Jul 6, 2017): Fixed in 1f9806a
Author
Owner

@Dgcoy commented on GitHub (Oct 11, 2018):

I may be missing something, but I am running the latest release and it looks like this issue may be back?
I've also enabled ENFORCE_GLOBAL_UNIQUE, but am getting the same result.

@Dgcoy commented on GitHub (Oct 11, 2018): I may be missing something, but I am running the latest release and it looks like this issue may be back? I've also enabled ENFORCE_GLOBAL_UNIQUE, but am getting the same result.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1046