Open yswtrue opened 2 months ago
fixed like this, is there any way to make a wrapper of this
class GameSchema(ModelSchema):
model_config = ConfigDict(model=Game)
@field_validator("thumb", mode="before", check_fields=False)
@classmethod
def transform_thumb_to_str(cls, value: ImageFieldFile) -> str:
return value.url
If you contribute a failing test it would be a lot easier to understand what's going on here.