We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b761342 commit 1f10495Copy full SHA for 1f10495
1 file changed
apps/zxbasic/app/routes/compile.py
@@ -29,7 +29,10 @@
29
30
class SessionVars(BaseModel):
31
x_hasura_role: str = Field(alias="x-hasura-role")
32
- x_hasura_user_id: Optional[UUID] = Field(alias="x-hasura-user-id")
+ # Absent for the public/unauthenticated role (e.g. the bot rendering a public
33
+ # project). In pydantic v2 Optional[...] without a default is still required,
34
+ # so default to None to make the field genuinely optional.
35
+ x_hasura_user_id: Optional[UUID] = Field(default=None, alias="x-hasura-user-id")
36
37
38
class Input(BaseModel):
0 commit comments