Fix TypeError if task.request.headers is None (#6367)

This commit is contained in:
pajowu
2026-07-09 18:52:49 +02:00
committed by GitHub
parent 430c6dd269
commit 7f847c3dd2
+1 -1
View File
@@ -59,7 +59,7 @@ def on_task_prerun(sender, task_id, task, **kwargs):
from pretix.helpers.logs import local
local.request_id = task_id
if "X-Pretix-Trace" in task.request.headers:
if task.request.headers and "X-Pretix-Trace" in task.request.headers:
local.trace = task.request.headers["X-Pretix-Trace"].split(" ")
else:
local.trace = []