diff --git a/backend-flask/models/player_team_availability.py b/backend-flask/models/player_team_availability.py index 9790190..fda003b 100644 --- a/backend-flask/models/player_team_availability.py +++ b/backend-flask/models/player_team_availability.py @@ -47,13 +47,12 @@ class AvailabilitySchema(spec.BaseModel): i += 1 class PlayerTeamAvailabilityRoleSchema(spec.BaseModel): - from models.player import PlayerSchema - from models.player_team_role import RoleSchema - - player: PlayerSchema + player: "PlayerSchema" playtime: int availability: int - roles: list[RoleSchema] + roles: list["RoleSchema"] +from models.player import PlayerSchema +from models.player_team_role import RoleSchema from models.player_team import PlayerTeam diff --git a/backend-flask/spec.py b/backend-flask/spec.py index 779ce3c..c6c1ce6 100644 --- a/backend-flask/spec.py +++ b/backend-flask/spec.py @@ -20,8 +20,7 @@ spec = SpecTree( nested_naming_strategy=nested_naming_strategy ) -class BaseModel(pydantic.v1.BaseModel): +class BaseModel(pydantic.BaseModel): class Config: alias_generator = to_camel - allow_population_by_field_name = True - smart_union = True + populate_by_name = True