#34099: update_or_create() not saving data assigned in a model's save() method
-------------------------------------+-------------------------------------
     Reporter:  Phil Gyford          |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Florian Apolloner):

 Thinking about this more I am wondering if we have to go through a
 deprecation path somehow for this feature/fix. The issue here is that
 overriding `save` and setting attributes is not reflected in the database
 which can be argued to be a dataloss bug. To be 100% clear on this: I
 actually do think that the new code is correct and it is up to the user to
 properly implement `save`. But since `update_fields` was not so important
 in the past I can imagine users not implementing it leading to bugs that
 are not discovered for a while etc… So I think this should be (it already
 is) a release blocker and should not downgraded to a normal bug. The only
 backwards compat fix I can envision is to hide this fix behind a setting
 which users need to turn to `True` + a backwards incompatible note in the
 release notes. This should pick up everyone reading the release notes or
 at least running their tests with warnings enabled. Another option would
 be to detect if `save` is overridden or if signals are attached to the
 model and act accordingly during the "deprecation".

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34099#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701841a6fcf73-53c26428-e05f-490c-9650-b3ffdae4bfd3-000000%40eu-central-1.amazonses.com.

Reply via email to