Skip to content

Commit

Permalink
fix: Format HSREvent name field
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Dec 12, 2024
1 parent ed522fa commit 215dd7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions genshin/models/starrail/chronicle/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ def __validate_status(cls, v: str) -> typing.Union[HSREventStatus, str]:
except ValueError:
return v

@pydantic.field_validator("name", mode="after")
def __format_name(cls, v: str) -> str:
return v.replace("\\n", " ")

@pydantic.field_validator("description", mode="after")
def __format_description(cls, v: str) -> str:
return v.replace("\\n", "\n")
Expand Down

0 comments on commit 215dd7d

Please sign in to comment.