[PR #20037] [MERGED] Fixes #19988: has_feature() should gracefully handle invalid ContentTypes #15806

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20037
Author: @jeremystretch
Created: 8/6/2025
Status: Merged
Merged: 8/8/2025
Merged by: @bctiemann

Base: featureHead: 19988-has_feature-invalid-objecttype


📝 Commits (1)

  • 13db4f7 Fixes #19988: has_feature() should gracefully handle invalid ContentTypes

📊 Changes

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

View changed files

📝 netbox/netbox/models/features.py (+5 -1)

📄 Description

Fixes: #19988

  • Extend the logic inside has_feature() to return False if the model class for a given ContentType cannot be resolved

🔄 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/20037 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/6/2025 **Status:** ✅ Merged **Merged:** 8/8/2025 **Merged by:** [@bctiemann](https://github.com/bctiemann) **Base:** `feature` ← **Head:** `19988-has_feature-invalid-objecttype` --- ### 📝 Commits (1) - [`13db4f7`](https://github.com/netbox-community/netbox/commit/13db4f728cfa9977e1e94e3645e16a177a279188) Fixes #19988: has_feature() should gracefully handle invalid ContentTypes ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/models/features.py` (+5 -1) </details> ### 📄 Description ### Fixes: #19988 - Extend the logic inside `has_feature()` to return False if the model class for a given ContentType cannot be resolved --- <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:24:10 +01:00
adam closed this issue 2025-12-30 00:24:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15806