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

role field cannot be null when changing ip address via API #2321

Closed
orgito opened this issue Aug 7, 2018 · 1 comment
Closed

role field cannot be null when changing ip address via API #2321

orgito opened this issue Aug 7, 2018 · 1 comment
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@orgito
Copy link

orgito commented Aug 7, 2018

Environment

  • Python version: 3.4.8
  • NetBox version: 2.4.0

Steps to Reproduce

Change an IP address with the role field as null.

Expected Behavior

Should save the IP address

Observed Behavior

Fails with the errror:

{"role":["This field may not be null."]}

Adding allow_null=True to https://github.com/digitalocean/netbox/blob/f59682a7c955baa6b336ebe927d69c26f725ad67/netbox/ipam/api/serializers.py#L261 solves the issue

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Aug 7, 2018
@jeremystretch
Copy link
Member

I've found this same issue in several places where ChoiceField is used on a nullable field.

@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
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants