#35014: update_or_create using update_fields opt out
-------------------------------------+-------------------------------------
Reporter: Jordan Hyatt | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jordan Hyatt):
I just thought it would be nice and simple to add a
"pass_update_fields=True" to update_or_create so that you can bypass the
new behavior implemented that can have a huge effect on previously written
code. You are right about catching the update_fields in the save, but
there is no way to know if the save was called by update_or_create or not.
What if sometimes I do want the update_fields to be used as is, just not
when update_or_create was the source?
--
Ticket URL: <https://code.djangoproject.com/ticket/35014#comment:2>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018c3bc8496e-5feb3fd4-11c9-4f9b-8b51-4b823dc9619c-000000%40eu-central-1.amazonses.com.