79297195

Date: 2024-12-20 12:18:12
Score: 0.5
Natty:
Report link

I have found a different solution for this situation. For me, it was too complicated to make the data replacement in the @post_dump method because of custom-calculated attributes in the schema. I have used the SQL Alchemy make_transient function. To remove the modified object from the session. So no changes done to the object are reflected in the database. This way I can do any modification to the object and generate modified schema without the requirement to rewrite the whole @pre_dump function.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: sakonn