79312846

Date: 2024-12-27 21:51:19
Score: 1
Natty:
Report link

This issue was caused by how the field was set. I was setting the data through pydantic model_dump_json.

raw_data = DataRaw(
    data=customer.model_dump_json(),
)

This however saved the JSON just as a string. Too bad SQLAlchemy gave no errors/warnings for that.

The problem was solved by replacing model_dump_json with model_dump.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Gronnmann