#30053: Allow for conditional QuerySet.update_or_create()
-------------------------------------+-------------------------------------
Reporter: Joshua Cannon | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: QuerySet | Triage Stage:
update_or_create | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
Could you detail your use case a bit more? I'm not sure I understand how
adding a condition to the `if created` statement would allow you to put
updates behind a condition given it's only reached when the rows gets
created.
Also, have you experimented with chaining `filter().update_or_create()` to
limit its application to a filtered domain?
--
Ticket URL: <https://code.djangoproject.com/ticket/30053#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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.9cc09fa83b186fbe718aa863ee4bb2c6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.