tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.58k stars 378 forks source link

Decimal field represented in scientific notation when using pydantic_model_creator #1549

Open Yalchin403 opened 8 months ago

Yalchin403 commented 8 months ago

Describe the bug I use pydantic_model_creator for creating schema from model which I use for serialization in the response. I have a decimal field, which is shown in scientific notation in the response instead of being Decimal.

To Reproduce

Expected behavior I normally expect to get the defined value as it is, for example, if I created this record's decimal field as 200.00 i expect it as 200.00 not as 2E+2

Additional context Add any other context about the problem here.

image
sloppycoder commented 3 months ago

i have the same problem...