🐛 Fix Validation Error for Diary

This commit is contained in:
洛水居室 2023-09-06 11:57:35 +08:00
parent 300d3aebc3
commit bc93d34edf
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -45,16 +45,11 @@ class MonthDiaryData(APIModel):
categories: List of diary categories.
"""
def __init__(self, **data):
if data.get("primogem_rate"):
data["primogems_rate"] = data.pop("primogem_rate")
super().__init__(**data)
current_primogems: int
current_mora: int
last_primogems: int
last_mora: int
primogems_rate: int
primogems_rate: int = Field(aliases="primogem_rate")
mora_rate: int
categories: List[DiaryActionCategory] = Field(alias="group_by")