[PR #3854] [CLOSED] Fix #3853 Dead role link in Config Contexts #12665

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3854
Author: @targuan
Created: 1/6/2020
Status: Closed

Base: developHead: bugfix/dead_device_role_link


📝 Commits (1)

📊 Changes

2 files changed (+4 additions, -1 deletions)

View changed files

📝 netbox/dcim/models.py (+3 -0)
📝 netbox/templates/dcim/device.html (+1 -1)

📄 Description

Fixes: #3853

The config context template calls get_absolute_url from the model DeviceRole. This method was not implemented on this model.
This result in a dead link on the config context view.

I implemented get_absolute_url on DeviceRole model.
I also updated the dcim/device template to use this method instead of the hardcoded url for consistency: the platforme link on this view used the get_absolute_url method of the Platform model.


🔄 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/3854 **Author:** [@targuan](https://github.com/targuan) **Created:** 1/6/2020 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `bugfix/dead_device_role_link` --- ### 📝 Commits (1) - [`ae65805`](https://github.com/netbox-community/netbox/commit/ae65805b805af139509ba1c54fe5dddebafd34d7) Fix #3853 Dead role link in Config Contexts ### 📊 Changes **2 files changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models.py` (+3 -0) 📝 `netbox/templates/dcim/device.html` (+1 -1) </details> ### 📄 Description ### Fixes: #3853 The config context template calls get_absolute_url from the model DeviceRole. This method was not implemented on this model. This result in a dead link on the config context view. I implemented get_absolute_url on DeviceRole model. I also updated the dcim/device template to use this method instead of the hardcoded url for consistency: the platforme link on this view used the get_absolute_url method of the Platform model. --- <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:22:55 +01:00
adam closed this issue 2025-12-29 22:22:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12665