From 55366426f772d49d809169185982ec45ca894b80 Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Tue, 16 Jul 2024 07:10:47 -0500 Subject: [PATCH] Improve clarity of record_stats for serialization. --- debug_toolbar/panels/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debug_toolbar/panels/__init__.py b/debug_toolbar/panels/__init__.py index a3869387f..7c162c864 100644 --- a/debug_toolbar/panels/__init__.py +++ b/debug_toolbar/panels/__init__.py @@ -173,7 +173,11 @@ def record_stats(self, stats): """ Store data gathered by the panel. ``stats`` is a :class:`dict`. - Each call to ``record_stats`` updates the statistics dictionary. + Each call to ``record_stats`` updates the store's data for + the panel. + + To support backwards compatibility, it will also update the + panel's statistics dictionary. """ self.toolbar.stats.setdefault(self.panel_id, {}).update(stats) self.toolbar.store.save_panel(