[PR #3910] [CLOSED] Fixes #3909: Regression from #3898 #12695

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3910
Author: @hSaria
Created: 1/13/2020
Status: Closed

Base: developHead: 3909-cable-str-regression


📝 Commits (1)

📊 Changes

2 files changed (+10 additions, -2 deletions)

View changed files

📝 docs/release-notes/version-2.6.md (+9 -1)
📝 netbox/dcim/models.py (+1 -1)

📄 Description

Fixes: #3909

Cable str method is being called during the super() in __init__ which is causing an exception when accessing _pk. It will now fallback to self.pk even if it's None (I didn't go with self.pk or self._pk as it may trigger the same issue on a new cable).


🔄 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/3910 **Author:** [@hSaria](https://github.com/hSaria) **Created:** 1/13/2020 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `3909-cable-str-regression` --- ### 📝 Commits (1) - [`b748f76`](https://github.com/netbox-community/netbox/commit/b748f76e173dca4b04a30baf535bd49a76339303) Fixes #3909: Regression from #3898 ### 📊 Changes **2 files changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.6.md` (+9 -1) 📝 `netbox/dcim/models.py` (+1 -1) </details> ### 📄 Description ### Fixes: #3909 Cable `str` method is being called during the `super()` in `__init__` which is causing an exception when accessing `_pk`. It will now fallback to `self.pk` even if it's None (I didn't go with `self.pk or self._pk` as it may trigger the same issue on a new cable). --- <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 22:23:05 +01:00
adam closed this issue 2025-12-29 22:23: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#12695