[PR #15813] [MERGED] Fixes #11460 - Fix unterminated cable exception when editing cable #14688

Closed
opened 2025-12-29 23:26:04 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15813
Author: @DanSheps
Created: 4/23/2024
Status: Merged
Merged: 5/1/2024
Merged by: @jeremystretch

Base: developHead: 11460-fix_unterminated_cable_throws_exception


📝 Commits (7)

  • 91efa14 Fix cable edit form with single unterminated cable
  • 7a54302 Minor tweaks
  • f37cb9b Instead of skipping HTMX, override the template & move form template to an "htmx" template
  • fc3e52d Use HTMXSelect widget for A/B type selection
  • 297ab4a Infer A/B termination types from POST data
  • a16564f Fix saving cable which results in resetting of the termination type fields
  • b8a2c62 Condense view logic

📊 Changes

6 files changed (+148 additions, -118 deletions)

View changed files

📝 netbox/dcim/forms/connections.py (+15 -6)
📝 netbox/dcim/forms/model_forms.py (+22 -4)
📝 netbox/dcim/views.py (+16 -21)
📝 netbox/netbox/views/generic/object_views.py (+2 -1)
📝 netbox/templates/dcim/cable_edit.html (+1 -86)
netbox/templates/dcim/htmx/cable_edit.html (+92 -0)

📄 Description

Fixes: #11460 - Fix unterminated cable exception when editing cable

  • Fixes the exception when a single cable is not present
  • Fixes the exception when both cables aren't present (but does not allow user to proceed)

🔄 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/15813 **Author:** [@DanSheps](https://github.com/DanSheps) **Created:** 4/23/2024 **Status:** ✅ Merged **Merged:** 5/1/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `11460-fix_unterminated_cable_throws_exception` --- ### 📝 Commits (7) - [`91efa14`](https://github.com/netbox-community/netbox/commit/91efa14dbb6d023aa073fa273d6f87a625a867b1) Fix cable edit form with single unterminated cable - [`7a54302`](https://github.com/netbox-community/netbox/commit/7a54302a653d03d08104a8cedb8ae408a781f4fa) Minor tweaks - [`f37cb9b`](https://github.com/netbox-community/netbox/commit/f37cb9bfd32f95b3d279a41c4755fd3de9259a74) Instead of skipping HTMX, override the template & move form template to an "htmx" template - [`fc3e52d`](https://github.com/netbox-community/netbox/commit/fc3e52d37b3cfe2851abd4f0563b274191ad9907) Use HTMXSelect widget for A/B type selection - [`297ab4a`](https://github.com/netbox-community/netbox/commit/297ab4a9db7ef3a84bda6e0019b1af18f9103f90) Infer A/B termination types from POST data - [`a16564f`](https://github.com/netbox-community/netbox/commit/a16564f9fcadb06f749a2d02fbf1cf2ad9f79fd3) Fix saving cable which results in resetting of the termination type fields - [`b8a2c62`](https://github.com/netbox-community/netbox/commit/b8a2c62e9e8968a22c34b50e186ee5ebbc7af2d4) Condense view logic ### 📊 Changes **6 files changed** (+148 additions, -118 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/forms/connections.py` (+15 -6) 📝 `netbox/dcim/forms/model_forms.py` (+22 -4) 📝 `netbox/dcim/views.py` (+16 -21) 📝 `netbox/netbox/views/generic/object_views.py` (+2 -1) 📝 `netbox/templates/dcim/cable_edit.html` (+1 -86) ➕ `netbox/templates/dcim/htmx/cable_edit.html` (+92 -0) </details> ### 📄 Description ### Fixes: #11460 - Fix unterminated cable exception when editing cable * Fixes the exception when a single cable is not present * Fixes the exception when both cables aren't present (but does not allow user to proceed) --- <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-29 23:26:04 +01:00
adam closed this issue 2025-12-29 23:26:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14688