[PR #20870] [MERGED] Fixes #20859: Handle dashboard widget exceptions #16072

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20870
Author: @jeremystretch
Created: 11/24/2025
Status: Merged
Merged: 11/24/2025
Merged by: @arthanson

Base: mainHead: 20859-dashboard-widget-exception


📝 Commits (2)

  • 6182c0c Fixes #20859: Object counts widget should handle models without restrict()
  • 15e6ae6 Handle cleanly exceptions raised during widget rendering

📊 Changes

2 files changed (+19 additions, -2 deletions)

View changed files

📝 netbox/extras/dashboard/widgets.py (+4 -1)
📝 netbox/extras/templatetags/dashboard.py (+15 -1)

📄 Description

Fixes: #20859

  • Fix the root issue in ObjectCountsWidget
  • Ensure that any exceptions raised when rendering a widget are caught and handled cleanly to preserve dashboard integrity

🔄 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/20870 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 11/24/2025 **Status:** ✅ Merged **Merged:** 11/24/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `main` ← **Head:** `20859-dashboard-widget-exception` --- ### 📝 Commits (2) - [`6182c0c`](https://github.com/netbox-community/netbox/commit/6182c0cb95c44939e5ebf55456fabdceacda99b1) Fixes #20859: Object counts widget should handle models without restrict() - [`15e6ae6`](https://github.com/netbox-community/netbox/commit/15e6ae6ccad186197539841c97ebf175309c3370) Handle cleanly exceptions raised during widget rendering ### 📊 Changes **2 files changed** (+19 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/dashboard/widgets.py` (+4 -1) 📝 `netbox/extras/templatetags/dashboard.py` (+15 -1) </details> ### 📄 Description ### Fixes: #20859 - Fix the root issue in ObjectCountsWidget - Ensure that any exceptions raised when rendering a widget are caught and handled cleanly to preserve dashboard integrity --- <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:25:38 +01:00
adam closed this issue 2025-12-30 00:25:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#16072