diff --git a/src/entities/models/dto.py b/src/entities/models/dto.py index 9c9eff3..2829afd 100644 --- a/src/entities/models/dto.py +++ b/src/entities/models/dto.py @@ -42,9 +42,9 @@ class Config: class UserProfile(BaseModel): - first_name: str = Field(alias='firstName') - last_name: str = Field(alias='lastName') - leis: Optional[Set[str]] = Field(alias='leis') + first_name: str = Field(alias="firstName") + last_name: str = Field(alias="lastName") + leis: Optional[Set[str]] = Field(alias="leis") class Config: alias_generator = to_camel diff --git a/src/routers/admin.py b/src/routers/admin.py index e64a246..bba47a9 100644 --- a/src/routers/admin.py +++ b/src/routers/admin.py @@ -21,7 +21,7 @@ async def get_me(request: Request): @router.put("/me/", status_code=HTTPStatus.ACCEPTED, dependencies=[Depends(check_domain)]) @requires("manage-account") async def update_me(request: Request, user: UserProfile): - oauth2_admin.update_user(request.user.id, user.dict(by_alias=True, exclude={'leis'})) + oauth2_admin.update_user(request.user.id, user.dict(by_alias=True, exclude={"leis"})) if user.leis: oauth2_admin.associate_to_leis(request.user.id, user.leis)