fix(AP1.7b): Audit user_id NULL bei Service-Token statt leerer UUID
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 4m38s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 13s

Operational convert-backlog und patch-recurring nutzen ctx.user_id or None;
log_audit normalisiert leere Strings fuer audit_log.user_id.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-28 09:33:35 +02:00
1 parent 903304adf1
commit 0baa5952bc
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -340,7 +340,7 @@ def operational_convert_backlog(
result = backlog_service.convert_backlog_to_action(
tenant_id=ctx.tenant_id,
backlog_item_id=backlog_item_id,
user_id=ctx.user_id,
user_id=ctx.user_id or None,
assigned_actor_ids=assigned,
work_cycle_id=body.work_cycle_id,
assign_active_sprint=body.assign_active_sprint,
@@ -375,7 +375,7 @@ def operational_patch_recurring(
item = recurring_service.update_recurring_element(
tenant_id=ctx.tenant_id,
recurring_id=recurring_id,
user_id=ctx.user_id,
user_id=ctx.user_id or None,
status=body.status,
)
except ValueError as exc:
+1 -1
View File
@@ -23,7 +23,7 @@ def log_audit(
INSERT INTO audit_log (action, user_id, tenant_id, details)
VALUES (%s, %s, %s, %s::jsonb)
""",
(action, user_id, tenant_id, json.dumps(details or {})),
(action, user_id or None, tenant_id, json.dumps(details or {})),
)
conn.commit()
finally: