[PR #4719] [MERGED] Fixes #4715: Avoid unnecessary queries in Cable.from_db #12907

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4719
Author: @steffann
Created: 6/4/2020
Status: Merged
Merged: 6/4/2020
Merged by: @jeremystretch

Base: developHead: 4715-avoid-unnecessary-queries


📝 Commits (1)

  • 8f9dcf5 Avoid unnecessary queries in Cable.from_db

📊 Changes

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

View changed files

📝 netbox/dcim/models/__init__.py (+4 -4)

📄 Description

Fixes: #4715

Storing the ContentType objects cause database queries. This PR proposes to store their ID instead.


🔄 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/4719 **Author:** [@steffann](https://github.com/steffann) **Created:** 6/4/2020 **Status:** ✅ Merged **Merged:** 6/4/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `4715-avoid-unnecessary-queries` --- ### 📝 Commits (1) - [`8f9dcf5`](https://github.com/netbox-community/netbox/commit/8f9dcf5a97d007f6341d5f0a5c09d68386c68f07) Avoid unnecessary queries in Cable.from_db ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/__init__.py` (+4 -4) </details> ### 📄 Description ### Fixes: #4715 Storing the ContentType objects cause database queries. This PR proposes to store their ID instead. --- <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:18 +01:00
adam closed this issue 2025-12-29 22:24:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12907