[PR #11709] [MERGED] Fixes #11335: Default manager for ObjectChange should filter by installed apps #13830

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/11709
Author: @jeremystretch
Created: 2/8/2023
Status: Merged
Merged: 7/5/2023
Merged by: @jeremystretch

Base: developHead: 11335-objectchange-manager


📝 Commits (5)

  • 51a76b5 Fixes #11335: Default manager for ObjectChange should filter by installed apps
  • 5c7173b Employ canonical model discovery mechanism
  • 07b093d Move filtering logic to valid_models() queryset method
  • a1ac266 fixed import to avoid content type does not exist
  • 7852522 Cleanup

📊 Changes

6 files changed (+25 additions, -9 deletions)

View changed files

📝 netbox/extras/api/views.py (+1 -1)
📝 netbox/extras/models/change_logging.py (+2 -2)
📝 netbox/extras/querysets.py (+13 -0)
📝 netbox/extras/tests/test_api.py (+2 -1)
📝 netbox/extras/views.py (+4 -4)
📝 netbox/users/views.py (+3 -1)

📄 Description

Fixes: #11335

Introduce a custom default manager for ObjectChange, which automatically filters results to those referencing models belonging to currently installed apps.

All credit goes to @kkthxbye-code for coming up with this solution!


🔄 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/11709 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/8/2023 **Status:** ✅ Merged **Merged:** 7/5/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `11335-objectchange-manager` --- ### 📝 Commits (5) - [`51a76b5`](https://github.com/netbox-community/netbox/commit/51a76b53068499733dfd61ef8a9616ec392b581e) Fixes #11335: Default manager for ObjectChange should filter by installed apps - [`5c7173b`](https://github.com/netbox-community/netbox/commit/5c7173bd18685d794392c7b7105438913b61a86f) Employ canonical model discovery mechanism - [`07b093d`](https://github.com/netbox-community/netbox/commit/07b093dfef6134754735b0eb0495efa7e81f6a49) Move filtering logic to valid_models() queryset method - [`a1ac266`](https://github.com/netbox-community/netbox/commit/a1ac2664d02eed18fd619a2c2b150356eb17f7f9) fixed import to avoid content type does not exist - [`7852522`](https://github.com/netbox-community/netbox/commit/7852522705e77345c536c4b88040acaae6c5fe2d) Cleanup ### 📊 Changes **6 files changed** (+25 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/api/views.py` (+1 -1) 📝 `netbox/extras/models/change_logging.py` (+2 -2) 📝 `netbox/extras/querysets.py` (+13 -0) 📝 `netbox/extras/tests/test_api.py` (+2 -1) 📝 `netbox/extras/views.py` (+4 -4) 📝 `netbox/users/views.py` (+3 -1) </details> ### 📄 Description ### Fixes: #11335 Introduce a custom default manager for ObjectChange, which automatically filters results to those referencing models belonging to currently installed apps. All credit goes to @kkthxbye-code for coming up with this solution! --- <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:21:02 +01:00
adam closed this issue 2025-12-29 23:21:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13830