[PR #5447] [MERGED] fixes #5387 - Fix error when rendering config contexts when objects have multiple tags assigned #13020

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5447
Author: @lampwins
Created: 12/11/2020
Status: Merged
Merged: 12/11/2020
Merged by: @jeremystretch

Base: developHead: 5387-config-context-tags


📝 Commits (2)

  • 3ef2a54 fixes #5387 - Fix error when rendering config contexts when objects have multiple tags assigned
  • 491742a Merge branch 'develop' into 5387-config-context-tags

📊 Changes

3 files changed (+60 additions, -1 deletions)

View changed files

📝 docs/release-notes/version-2.9.md (+1 -0)
📝 netbox/extras/querysets.py (+16 -1)
📝 netbox/extras/tests/test_models.py (+43 -0)

📄 Description

Fixes: #5387

Added a subquery to replace the ORM's use of an outer join on extras_taggedobjects which returns duplicate records when multiple tags are assigned to objects. Also added a new test for this case.


🔄 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/5447 **Author:** [@lampwins](https://github.com/lampwins) **Created:** 12/11/2020 **Status:** ✅ Merged **Merged:** 12/11/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `5387-config-context-tags` --- ### 📝 Commits (2) - [`3ef2a54`](https://github.com/netbox-community/netbox/commit/3ef2a54a5e148f7312d700e34ea8fc24470f91ff) fixes #5387 - Fix error when rendering config contexts when objects have multiple tags assigned - [`491742a`](https://github.com/netbox-community/netbox/commit/491742ad26228fa79b8737fdf6618d63b882d4f3) Merge branch 'develop' into 5387-config-context-tags ### 📊 Changes **3 files changed** (+60 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.9.md` (+1 -0) 📝 `netbox/extras/querysets.py` (+16 -1) 📝 `netbox/extras/tests/test_models.py` (+43 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #5387 <!-- Please include a summary of the proposed changes below. --> Added a subquery to replace the ORM's use of an outer join on extras_taggedobjects which returns duplicate records when multiple tags are assigned to objects. Also added a new test for this case. --- <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:24:57 +01:00
adam closed this issue 2025-12-29 22:24:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13020