Conversation
|
@claude /review |
|
Claude finished @pheus's task in 3m 35s —— View job Code Review: Add support for disabling Device and Module bays
OverviewThis PR adds an Issues1. Missing model-level validation testsThe PR adds validation logic in Suggested tests:
2. Missing documentation updates
Minor Observations3.
|
| Category | Status |
|---|---|
| Model fields | ✅ Correct, consistent across all 4 models |
| Migration | ✅ Valid (minor cosmetic nit on verbose_name) |
| Serializers | ✅ Follows existing patterns |
| Filtersets | ✅ Correct |
| Forms (model/bulk/import) | ✅ Correct |
| Tables & template code | ✅ UI correctly gates install button on enabled |
| GraphQL filters | ✅ Correct |
| Validation logic | ✅ Correct semantics; |
| Documentation | enabled field description in docs |
| Test coverage |
e747fcc to
673e54a
Compare
Add an `enabled` boolean field to ModuleBay, ModuleBayTemplate, DeviceBay, and DeviceBayTemplate models. Disabled bays prevent component installation and display accordingly in the UI. Update serializers, filters, forms, and tables to support the new field. Fixes #20152
673e54a to
625c4eb
Compare
|
@claude /review
|
|
Claude finished @pheus's task in 1m 1s —— View job Updated Review: Add support for disabling Device and Module baysThanks for the clarifications and updates. Here's the revised status for each point: 1. Missing model-level validation tests → ✅ Addressed Three thorough tests added to
2. Missing documentation → ✅ Addressed Both 3. The user is correct: 4. Redundant The override is justified because CSV form processing submits empty strings for missing columns, which the model's default doesn't handle automatically. 5–7. Cosmetic/minor observations → ✅ Non-issues or already addressed SummaryAll substantive issues from the original review have been addressed. The implementation is clean, consistent with NetBox conventions, and now has proper test coverage for the new validation logic. The PR looks good to merge. |
Fixes: #20152
This PR adds an
enabledboolean field toModuleBay,ModuleBayTemplate,DeviceBay, andDeviceBayTemplate.The intent is to model bay availability as a simple on/off state, which feels like the best fit for this feature and keeps the implementation lightweight. Disabled bays are now reflected in the UI and cannot be used for new device or module installation. Forms, filters, serializers, and tables have also been updated so the new field is supported consistently across NetBox.