Skip to content

Commit 390d207

Browse files
committed
revert schemas profiles.py
1 parent 4ce889a commit 390d207

File tree

1 file changed

+5
-9
lines changed
  • services/api-server/src/simcore_service_api_server/models/schemas

1 file changed

+5
-9
lines changed

services/api-server/src/simcore_service_api_server/models/schemas/profiles.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@
99

1010

1111
class ProfileCommon(BaseModel):
12-
first_name: FirstNameStr = Field(
13-
None, examples=["James"]
14-
) # TODO: should be nullable
15-
last_name: LastNameStr = Field(
16-
None, examples=["Maxwell"]
17-
) # TODO: should be nullable
12+
first_name: FirstNameStr | None = Field(None, examples=["James"])
13+
last_name: LastNameStr | None = Field(None, examples=["Maxwell"])
1814

1915

2016
class ProfileUpdate(ProfileCommon):
@@ -35,12 +31,12 @@ class Profile(ProfileCommon):
3531
id_: UserID = Field(alias="id")
3632
login: LowerCaseEmailStr
3733
role: UserRoleEnum
38-
groups: Groups = None # TODO: should be nullable
39-
gravatar_id: str = Field(
34+
groups: Groups | None = None
35+
gravatar_id: str | None = Field(
4036
None,
4137
description="md5 hash value of email to retrieve an avatar image from https://www.gravatar.com",
4238
max_length=40,
43-
) # TODO: should be nullable
39+
)
4440

4541
@field_validator("role", mode="before")
4642
@classmethod

0 commit comments

Comments
 (0)