Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ShiyuDefense begin_time and end_time Optional #217

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

Polygonalr
Copy link
Contributor

hadal_begin_time and hadal_end_time are returned as null if the player has not challenge this season's Shiyu Defense yet.

{
  "retcode": 0,
  "message": "OK",
  "data": {
    "schedule_id": 0,
    "begin_time": "0",
    "end_time": "0",
    "rating_list": [],
    "has_data": false,
    "all_floor_detail": [],
    "fast_layer_time": 0,
    "max_layer": 0,
    "hadal_begin_time": null,
    "hadal_end_time": null
  }
}

This can cause get_shiyu_defense to fail Pydantic validation. This PR addresses this by making both ShiyuDefense.begin_time and ShiyuDefense.end_time Optionals.

@seriaati
Copy link
Collaborator

seriaati commented Aug 4, 2024

Thanks for the PR, can you fix the lint issues?

@seriaati seriaati merged commit c34f63d into thesadru:master Aug 4, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants