diff --git a/modules/gacha_log/models.py b/modules/gacha_log/models.py index aae4fe1..e4673ff 100644 --- a/modules/gacha_log/models.py +++ b/modules/gacha_log/models.py @@ -2,9 +2,9 @@ import datetime from enum import Enum from typing import Any, Dict, List, Union, Optional -from pydantic import field_validator +from pydantic import field_validator, BaseModel -from simnet.models.base import APIModel as BaseModel, DateTimeField, add_timezone +from simnet.models.base import DateTimeField, add_timezone from metadata.shortname import not_real_roles, roleToId, weaponToId, buddyToId from modules.gacha_log.const import UIGF_VERSION diff --git a/utils/patch/pydantic_basemodel.py b/utils/patch/pydantic_basemodel.py new file mode 100644 index 0000000..36f35b1 --- /dev/null +++ b/utils/patch/pydantic_basemodel.py @@ -0,0 +1,5 @@ +import pydantic + +pydantic.BaseModel.model_config["extra"] = "allow" +pydantic.BaseModel.model_config["coerce_numbers_to_str"] = True +pydantic.BaseModel.model_config["arbitrary_types_allowed"] = True