Guard user.email access in fragment middleware
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m2s

Handle case where email is None for pre-existing sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-24 23:03:40 +00:00
parent be9fa8e920
commit 670aa582df

View File

@@ -170,7 +170,7 @@ def create_app() -> FastAPI:
from artdag_common.fragments import fetch_fragments as _fetch_frags
user = get_user_from_cookie(request)
auth_params = {"email": user.email} if user else {}
auth_params = {"email": user.email} if user and user.email else {}
nav_params = {"app_name": "artdag", "path": path}
try: