-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: pluginsRelates to the plugins frameworkRelates to the plugins frameworktype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
Deployment Type
Self-hosted
NetBox Version
v4.0.6
Python Version
3.10
Steps to Reproduce
A bit complex, let me know if you really want me to go through a thorough plugin example
- Create a plugin with a model related to Core models.
- Create a set of views and urls for that model, without creating any
_listviews. - Register that plugin in your netbox instance
- Create and install required migrations
Expected Behavior
Related core model detail view should work as expected regardless of the missing _list view in the plugin.
Observed Behavior
Bug Introduced by 5353f83
I have models with no *_list views related to core models in my plugin and they get picked up by get_related_models in GetRelatedModelsMixin which raises a NoReverseMatch exception in netbox/templates/inc/panels/related_objects.html
Technically get_related_models has been designed with the idea that one can set the omit method parameter to an iterable to avoid including these but there does not seem to have API which is exposed to plugin authors for Core models.
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: pluginsRelates to the plugins frameworkRelates to the plugins frameworktype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application