Virtual Chassis master field cannot be null according to the API #6955

Closed
opened 2025-12-29 19:47:09 +01:00 by adam · 4 comments
Owner

Originally created by @RobinGeuze on GitHub (Sep 9, 2022).

Originally assigned to: @sasschary on GitHub.

NetBox version

v3.2.9

Python version

3.10

Steps to Reproduce

  1. Submit API write request to the VirtualChassis with "master": null in it

Expected Behavior

Requests is accepted and the master is unset for the specific VirtualChassis

Observed Behavior

HTTP 400 is returned with the message: [{"master":["This field may not be null."]}]

Originally created by @RobinGeuze on GitHub (Sep 9, 2022). Originally assigned to: @sasschary on GitHub. ### NetBox version v3.2.9 ### Python version 3.10 ### Steps to Reproduce 1. Submit API write request to the VirtualChassis with "master": null in it ### Expected Behavior Requests is accepted and the master is unset for the specific VirtualChassis ### Observed Behavior HTTP 400 is returned with the message: `[{"master":["This field may not be null."]}]`
adam added the type: bugstatus: accepted labels 2025-12-29 19:47:09 +01:00
adam closed this issue 2025-12-29 19:47:09 +01:00
Author
Owner

@RobinGeuze commented on GitHub (Sep 9, 2022):

It probably needs allow_null=True and default=None here: https://github.com/netbox-community/netbox/blob/master/netbox/dcim/api/serializers.py#L1079

@RobinGeuze commented on GitHub (Sep 9, 2022): It probably needs allow_null=True and default=None here: https://github.com/netbox-community/netbox/blob/master/netbox/dcim/api/serializers.py#L1079
Author
Owner

@DanSheps commented on GitHub (Sep 10, 2022):

@RobinGeuze do you want to take this issue?

@DanSheps commented on GitHub (Sep 10, 2022): @RobinGeuze do you want to take this issue?
Author
Owner

@sasschary commented on GitHub (Sep 12, 2022):

I'll grab this if not, seems like a simple enough fix

@sasschary commented on GitHub (Sep 12, 2022): I'll grab this if not, seems like a simple enough fix
Author
Owner

@RobinGeuze commented on GitHub (Sep 12, 2022):

I won't really have time to pick this up myself the coming weeks, so if somebody else could pick this up it would really be appreciated :)

@RobinGeuze commented on GitHub (Sep 12, 2022): I won't really have time to pick this up myself the coming weeks, so if somebody else could pick this up it would really be appreciated :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6955