[PR #18027] [MERGED] Fixes: #7699 - Access _site of cluster instead of site #15252

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18027
Author: @bctiemann
Created: 11/15/2024
Status: Merged
Merged: 11/18/2024
Merged by: @jeremystretch

Base: featureHead: 7699-check-cluster-site


📝 Commits (1)

  • e4b7df6 Access _site of cluster instead of site

📊 Changes

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

View changed files

📝 netbox/virtualization/forms/bulk_edit.py (+1 -1)

📄 Description

Fixes: #7699

Addresses a bug related to #7699 (Scope attributes moved to GFKs and cached accessors) where bulk-editing VMInterfaces would raise an AttributeError due to looking up interface.virtual_machine.cluster.site directly.

This is a low-impact fix that should not add more risk (virtual_machine.cluster appears to always be set); however it is accessing a private attribute of the CachedScopeMixin which may not be great style-wise.


🔄 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/18027 **Author:** [@bctiemann](https://github.com/bctiemann) **Created:** 11/15/2024 **Status:** ✅ Merged **Merged:** 11/18/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `7699-check-cluster-site` --- ### 📝 Commits (1) - [`e4b7df6`](https://github.com/netbox-community/netbox/commit/e4b7df68a6449cde0ff96cb0345fb7059bfe8deb) Access _site of cluster instead of site ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/virtualization/forms/bulk_edit.py` (+1 -1) </details> ### 📄 Description ### Fixes: #7699 Addresses a bug related to #7699 (Scope attributes moved to GFKs and cached accessors) where bulk-editing VMInterfaces would raise an AttributeError due to looking up `interface.virtual_machine.cluster.site` directly. This is a low-impact fix that should not add more risk (`virtual_machine.cluster` appears to always be set); however it is accessing a private attribute of the `CachedScopeMixin` which may not be great style-wise. --- <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:20:53 +01:00
adam closed this issue 2025-12-30 00:20:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15252