Skip to content
Open
Changes from all commits
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
6 changes: 5 additions & 1 deletion tina4_python/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,11 @@ def _stage_dev_toolbar_inject(ctx: DispatchContext) -> None:
Best-effort: a toolbar that fails to render must never break the response
it was decorating, so the whole thing is guarded.
"""
if not ctx.is_dev or not ctx.response.content_type:
if (
not ctx.is_dev
or not ctx.response.content_type
or ctx.response.status_code == 204
):
return None
if "text/html" not in ctx.response.content_type:
return None
Expand Down