Changes between Version 1 and Version 2 of Ticket #36847, comment 10


Ignore:
Timestamp:
Jan 7, 2026, 1:20:32 PM (28 hours ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36847, comment 10

    v1 v2  
    33We should definitely pass `add=True` as you pointed out for correctness reasons but given we discard the values if they are not expressions this seems more like a way to avoid subtle undefined behavior breakages that we can afford but it doesn't require too much gymnastics on our end.
    44
    5 For example, something else that subtly changed is that we now call `pre_save` twice (in `Model._save_table` and `SQLInsertCompiler.as_sql`) and is something that would require way more invasive changes to address compared to flipping `add=True` to resolve this particular ticket.
     5For example, something else that subtly changed is that we now call `pre_save` twice (in `Model._save_table` and `SQLInsertCompiler.as_sql`) and it would require way more invasive changes to address compared to flipping `add=True` to resolve this particular ticket.
    66
    77I believe that landing a patch here should be seen as a way to correctly invoke the saving machinery (we've historically called `pre_save` with `add=True`) over a long term commitment over model field definition order dictating attribute presence on model instances.
Back to Top