Skip to content

Commit

Permalink
фикс опять этой ебаной апишки (#83)
Browse files Browse the repository at this point in the history
Co-authored-by: velizhanin_ie <[email protected]>
  • Loading branch information
MaHryCT3 and velizhanin_ie authored Dec 12, 2024
1 parent 9a5ed0e commit 4e59fc7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/api_clients/magic_rust/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ def set_default_0(cls, value, _) -> int:
return 0
return value

@field_validator('server_type', mode='before')
@classmethod
def validate_server_type(cls, value, _) -> str:
if value in ['main', 'long']:
return ServerTypes.OFFICIAL
return value


class CombinedServerData(FullServerData, MonitoringServerData):
@classmethod
Expand Down

0 comments on commit 4e59fc7

Please sign in to comment.