Skip to content

Hide exception in ObjectCountsWidget for models without a xxx_list view function #17342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

candlerb
Copy link
Contributor

@candlerb candlerb commented Sep 3, 2024

Fixes #17341

This is a quick workaround specifically to stop ObjectCountsWidget raising an exception for models without a xxx_list view function.

(A better, more generally useful solution would be to catch exceptions raised by any widget, and allow the widget pane to be displayed with an error message. That would avoid Netbox becoming unusable for any widget problem, and would also allow the widget settings to be edited to correct the problem)

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @candlerb!

@jeremystretch jeremystretch merged commit 7a2ff96 into netbox-community:develop Sep 3, 2024
3 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ObjectCountsWidget can brick Netbox home page
3 participants