File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
debug_toolbar/panels/history Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1- from typing import Union
2-
31from django .http import HttpRequest , HttpResponseBadRequest , JsonResponse
42from django .template .loader import render_to_string
53
1513@render_with_toolbar_language
1614def history_sidebar (
1715 request : HttpRequest ,
18- ) -> Union [ HttpResponseBadRequest , JsonResponse ] :
16+ ) -> HttpResponseBadRequest | JsonResponse :
1917 """Returns the selected debug toolbar history snapshot."""
2018 form = HistoryStoreForm (request .GET )
2119
2220 if form .is_valid ():
2321 request_id : str = form .cleaned_data ["request_id" ]
24- toolbar : Union [ DebugToolbar , None ] = DebugToolbar .fetch (request_id )
22+ toolbar : DebugToolbar | None = DebugToolbar .fetch (request_id )
2523 exclude_history = form .cleaned_data ["exclude_history" ]
2624 context : dict [str , dict [str , str ]] = {}
2725 if toolbar is None :
@@ -49,7 +47,7 @@ def history_sidebar(
4947@render_with_toolbar_language
5048def history_refresh (
5149 request : HttpRequest ,
52- ) -> Union [ HttpResponseBadRequest , JsonResponse ] :
50+ ) -> HttpResponseBadRequest | JsonResponse :
5351 """Returns the refreshed list of table rows for the History Panel."""
5452 form = HistoryStoreForm (request .GET )
5553
You can’t perform that action at this time.
0 commit comments