[PR #15533] [MERGED] 15532 fix autotype_decorator for method fields #14607

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15533
Author: @arthanson
Created: 3/26/2024
Status: Merged
Merged: 4/15/2024
Merged by: @jeremystretch

Base: featureHead: 15532-autotype-decorator


📝 Commits (1)

  • 771aa59 15532 fix autotype_decorator for method fields

📊 Changes

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

View changed files

📝 netbox/netbox/graphql/filter_mixins.py (+6 -1)

📄 Description

Fixes: #15532

Fixes the case found in migrating the DNS plugin to NB 4 where an annotated field was declared (therefore not appearing in the model) and filtered on. This causes an error as the current code expects fields to be in the model definition.

Fix is to skip any undefined fields, they will need to be explicitly defined in the GraphQL filter class.


🔄 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/15533 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 3/26/2024 **Status:** ✅ Merged **Merged:** 4/15/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `15532-autotype-decorator` --- ### 📝 Commits (1) - [`771aa59`](https://github.com/netbox-community/netbox/commit/771aa59839a299f9a42259c80e6867dd2c55e7cc) 15532 fix autotype_decorator for method fields ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/graphql/filter_mixins.py` (+6 -1) </details> ### 📄 Description ### Fixes: #15532 Fixes the case found in migrating the DNS plugin to NB 4 where an annotated field was declared (therefore not appearing in the model) and filtered on. This causes an error as the current code expects fields to be in the model definition. Fix is to skip any undefined fields, they will need to be explicitly defined in the GraphQL filter class. --- <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:25:28 +01:00
adam closed this issue 2025-12-29 23:25:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14607