Skip to content

Commit

Permalink
Refs jazzband#1668: Fixed the unsortable session keys fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Aug 21, 2024
1 parent 6fc5ce8 commit c8e22a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion debug_toolbar/panels/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@ def generate_stats(self, request, response):
(k, request.session.get(k)) for k in sorted(request.session.keys())
]
except TypeError:
session_list = [(k, request.session.get(k)) for k in request.session]
session_list = [
(k, request.session.get(k))
for k in request.session.keys() # noqa: SIM118 (it's not a dict)
]
self.record_stats({"session": {"list": session_list}})
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Pending
* Add translations for Bulgarian and Korean.
* Update translations for several languages.
* Include new translatable strings for translation.
* Fixed a crash which happened in the fallback case when session keys cannot be
sorted.

4.4.6 (2024-07-10)
------------------
Expand Down

0 comments on commit c8e22a6

Please sign in to comment.