Closed amyasnikov closed 10 months ago
Hi @amyasnikov, thank you for pointing on this issue!
Looks like the primary issue is in value_to_string
method -- I pushed an update to your PR here. Also added some tests for it.
I think these changes will be released the next week -- master branch is already frozen for 0.3.0 release. In meantime I can backport it for 0.2.* branch.
Django has built-in serializers. To support serializing Django models which contain PydanticSchemaField it is necessary to re-implement value_from_object(). Without this fix Django serialization encounters errors if a model contains PydanticSchemaField fields.