Modifying a Virtual Chassis fails without error message when member device is missing a required custom field #7559

Closed
opened 2025-12-29 20:25:25 +01:00 by adam · 0 comments
Owner

Originally created by @tychescoin on GitHub (Jan 25, 2023).

Originally assigned to: @kkthxbye-code on GitHub.

NetBox version

v3.4.3

Python version

3.10

Steps to Reproduce

  1. Create a device
  2. Create a custom field marking it as required and choosing DCIM > Device as a Content Type
  3. Create a virtual chassis adding the device created in step 1 as a member. Save the virtual chassis
  4. Edit the virtual chassis created in step 4. Make any change except removing the member device and hit OK

Same behavior occurs in the Add Member page.

  1. Create a device
  2. Create a custom field marking it as required and choosing DCIM > Device as a Content Type
  3. Create a virtual chassis without adding a member device. Save the virtual chassis
  4. Try to add the member device created in step 1 to the virtual chassis created in step 3 via the add member page.

Expected Behavior

Either the change should be applied and the browser should return the virtual chassis view page for the modified chassis or there should be an error popup indicating that a required field is missing for the member device. Given that it isn't obvious that the member device is being modified while editing the virtual chassis (especially when only trying to add a comment), applying the change would be more intuitive but the device missing a required field is an error state that could have further impact in the future so failing with a clear error message might be more beneficial.

Observed Behavior

The Edit Virtual Chassis page reloads without error message or any indication of what the issue is. The change is not applied.

It appears the missing required field on the member device is causing the formset.is_valid() check to fail in the post methods of the VirtualChassisEditView and VirtualChassisAddMemberView

Originally created by @tychescoin on GitHub (Jan 25, 2023). Originally assigned to: @kkthxbye-code on GitHub. ### NetBox version v3.4.3 ### Python version 3.10 ### Steps to Reproduce 1. Create a device 2. Create a custom field marking it as required and choosing DCIM > Device as a Content Type 3. Create a virtual chassis adding the device created in step 1 as a member. Save the virtual chassis 4. Edit the virtual chassis created in step 4. Make any change except removing the member device and hit OK Same behavior occurs in the Add Member page. 1. Create a device 2. Create a custom field marking it as required and choosing DCIM > Device as a Content Type 3. Create a virtual chassis without adding a member device. Save the virtual chassis 4. Try to add the member device created in step 1 to the virtual chassis created in step 3 via the add member page. ### Expected Behavior Either the change should be applied and the browser should return the virtual chassis view page for the modified chassis or there should be an error popup indicating that a required field is missing for the member device. Given that it isn't obvious that the member device is being modified while editing the virtual chassis (especially when only trying to add a comment), applying the change would be more intuitive but the device missing a required field is an error state that could have further impact in the future so failing with a clear error message might be more beneficial. ### Observed Behavior The Edit Virtual Chassis page reloads without error message or any indication of what the issue is. The change is not applied. It appears the missing required field on the member device is causing the formset.is_valid() check to fail in the post methods of the VirtualChassisEditView and VirtualChassisAddMemberView
adam added the type: bugstatus: accepted labels 2025-12-29 20:25:25 +01:00
adam closed this issue 2025-12-29 20:25:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7559