[PR #19246] [MERGED] Closes #18976 Display FHRP Group name on VM Interface page #15578

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19246
Author: @renatoalmeidaoliveira
Created: 4/21/2025
Status: Merged
Merged: 4/22/2025
Merged by: @jeremystretch

Base: mainHead: 18976-Display-FHRP-Group-name-on-VM-Interface-page


📝 Commits (1)

  • 798850b make INTERFACE_FHRPGROUPS use FHRPGROUPS str representation

📊 Changes

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

View changed files

📝 netbox/dcim/tables/template_code.py (+1 -1)

📄 Description

Closes: #18976 Display FHRP Group name on VM Interface page

The FHRPGroup model defines a logic for its __str__ representation, as seen in the code implementation. However, the INTERFACE_FHRPGROUPS template currently uses a different representation for FHRPGroup, instead of relying on its __str__ method.

Since the __str__ representation already encapsulates all the necessary data for this use case, it makes sense to standardize the logic by ensuring INTERFACE_FHRPGROUPS utilizes the FHRPGroup model’s __str__ method when displaying the field.


🔄 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/19246 **Author:** [@renatoalmeidaoliveira](https://github.com/renatoalmeidaoliveira) **Created:** 4/21/2025 **Status:** ✅ Merged **Merged:** 4/22/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `18976-Display-FHRP-Group-name-on-VM-Interface-page` --- ### 📝 Commits (1) - [`798850b`](https://github.com/netbox-community/netbox/commit/798850b4b82eaa668956922e29441ba888532ad1) make INTERFACE_FHRPGROUPS use FHRPGROUPS _str_ representation ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/tables/template_code.py` (+1 -1) </details> ### 📄 Description ### Closes: #18976 Display FHRP Group name on VM Interface page The `FHRPGroup` model defines a logic for its `__str__` representation, as seen in the [code implementation](https://github.com/netbox-community/netbox/blob/248c94bd3536e11b63eac7e05973274911fb5e7b/netbox/ipam/models/fhrp.py#L59). However, the `INTERFACE_FHRPGROUPS` template currently uses a different representation for `FHRPGroup`, instead of relying on its `__str__` method. Since the `__str__` representation already encapsulates all the necessary data for this use case, it makes sense to standardize the logic by ensuring `INTERFACE_FHRPGROUPS` utilizes the `FHRPGroup` model’s `__str__` method when displaying the field. --- <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:22:49 +01:00
adam closed this issue 2025-12-30 00:22:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15578