Skip to content
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

Duplicate ip address using API #1285

Closed
Atoms opened this issue Jun 19, 2017 · 3 comments
Closed

Duplicate ip address using API #1285

Atoms opened this issue Jun 19, 2017 · 3 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@Atoms
Copy link

Atoms commented 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.

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Jun 19, 2017
@jeremystretch
Copy link
Member

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
Copy link
Member

Fixed in 1f9806a

@Dgcoy
Copy link

Dgcoy commented 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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants