fix: make account_id and account_role nullable in User type and schema
The User model has account_id as Optional[UUID] but the frontend type and backend schema declared it non-nullable. Solo users without a team have no account, so both must allow null. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,8 +40,8 @@ class UserLogin(BaseModel):
|
|||||||
class UserResponse(UserBase):
|
class UserResponse(UserBase):
|
||||||
id: UUID
|
id: UUID
|
||||||
role: str = "engineer"
|
role: str = "engineer"
|
||||||
account_id: UUID
|
account_id: Optional[UUID] = None
|
||||||
account_role: str
|
account_role: Optional[str] = None
|
||||||
is_super_admin: bool = False
|
is_super_admin: bool = False
|
||||||
is_active: bool = True
|
is_active: bool = True
|
||||||
must_change_password: bool = False
|
must_change_password: bool = False
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ export interface User {
|
|||||||
is_super_admin: boolean
|
is_super_admin: boolean
|
||||||
is_active: boolean
|
is_active: boolean
|
||||||
must_change_password: boolean
|
must_change_password: boolean
|
||||||
account_id: string
|
account_id: string | null
|
||||||
account_role: 'owner' | 'engineer' | 'viewer'
|
account_role: 'owner' | 'engineer' | 'viewer' | null
|
||||||
created_at: string
|
created_at: string
|
||||||
last_login: string | null
|
last_login: string | null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user