Ipaddress model does not accept null value for role, but serializer does (regression in 3.5-beta) #12195
Labels
beta
Concerns a bug/feature in a beta release
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
NetBox version
v3.5-beta
Python version
3.10
Steps to Reproduce
Expected Behavior
IP address is created with role = '' (as in 3.4) or role = null
Observed Behavior
This is caused by adding "allow_null=True" to the role field in IPAddressSerializer in the beta code. Without allow_null the serializer silently changes the null value to '' which does not raise the database exception.
Maybe changing the database field to also allow null values is the best option here since a GET request already returns null for an empty ('') value in the database.
The text was updated successfully, but these errors were encountered: