[PR #20337] [MERGED] Fixes #20197: Correct validation for virtual chassis parent interface #15895

Closed
opened 2025-12-30 00:24:39 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20337
Author: @pheus
Created: 9/12/2025
Status: Merged
Merged: 9/12/2025
Merged by: @jnovinger

Base: mainHead: 20197-fix-parent-interface-assignment-validation-for-virtual-chassis


📝 Commits (1)

  • b4d6734 fix(dcim): Correct validation for virtual chassis parent interface

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 netbox/dcim/models/device_components.py (+3 -3)

📄 Description

Fixes: #20197

Summary
Fixes an AttributeError during parent interface validation by checking the VC on devices (use self.device.virtual_chassis and self.parent.device.virtual_chassis). This allows a parent on another member of the same VC and rejects mismatches.

Thanks @elipsion for the STR and for pointing out the incorrect reference.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/20337 **Author:** [@pheus](https://github.com/pheus) **Created:** 9/12/2025 **Status:** ✅ Merged **Merged:** 9/12/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `20197-fix-parent-interface-assignment-validation-for-virtual-chassis` --- ### 📝 Commits (1) - [`b4d6734`](https://github.com/netbox-community/netbox/commit/b4d6734ceab6f946a29e4d57ceb929c0627237a7) fix(dcim): Correct validation for virtual chassis parent interface ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/device_components.py` (+3 -3) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #20197 **Summary** Fixes an `AttributeError` during parent interface validation by checking the VC on **devices** (use `self.device.virtual_chassis` and `self.parent.device.virtual_chassis`). This allows a parent on another member of the same VC and rejects mismatches. Thanks @elipsion for the STR and for pointing out the incorrect reference. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:24:39 +01:00
adam closed this issue 2025-12-30 00:24:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15895