Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions debug_toolbar/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,8 @@ def from_store(cls, request_id, panel_id=None):
if panel_id and panel.panel_id != panel_id:
continue
data = toolbar.store.panel(toolbar.request_id, panel.panel_id)
if data:
panel.load_stats_from_store(data)
toolbar._panels[panel.panel_id] = panel
panel.load_stats_from_store(data)
toolbar._panels[panel.panel_id] = panel
return toolbar


Expand Down
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Pending
* Removed logging about the toolbar failing to serialize a value into JSON.
* Moved the the import statement of ``debug_toolbar.urls`` to within the if
statement's scope on the installation documentation.
* Changed ``StoredDebugToolbar.from_store`` to always create a panel key and
class instance, regardless if any data was generated.

6.0.0 (2025-07-22)
------------------
Expand Down
3 changes: 3 additions & 0 deletions tests/panels/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from django.urls import resolve, reverse

from debug_toolbar.panels.history import HistoryPanel
from debug_toolbar.panels.redirects import RedirectsPanel
from debug_toolbar.store import get_store
from debug_toolbar.toolbar import DebugToolbar

Expand Down Expand Up @@ -80,6 +81,7 @@ class HistoryViewsTestCase(IntegrationTestCase):
"AlertsPanel",
"CachePanel",
"SignalsPanel",
"ProfilingPanel",
}

def test_history_panel_integration_content(self):
Expand Down Expand Up @@ -138,6 +140,7 @@ def test_history_sidebar_includes_history(self):
self.client.get("/json_view/")
panel_keys = copy.copy(self.PANEL_KEYS)
panel_keys.add(HistoryPanel.panel_id)
panel_keys.add(RedirectsPanel.panel_id)
request_id = list(get_store().request_ids())[0]
data = {"request_id": request_id}
response = self.client.get(reverse("djdt:history_sidebar"), data=data)
Expand Down
Loading