In the end `update_or_create` (and most likely `get_or_create`) might be
written in more efficient ways depending on the database backend -- but
`update_fields` seems to be a rather low-hanging fruit.
--
Ticket URL: <https://code.djangoproject.com/ticket/32095>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: Liel Fridman => Florian Apolloner
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/13526 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:3>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:4>
* owner: Florian Apolloner => Sarah Boyce
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:5>
* needs_better_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/16072 New PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:6>
* needs_better_patch: 1 => 0
Comment:
Tentatively removing the `patch_needs_improvement` flag, there is a
comment about clarifying existing documentation but not sure if that needs
to be included in this PR :)
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:7>
* cc: David Wobrock (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:8>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:9>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:10>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:11>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"6cc0f22a73970dd7c0d29d4d8d2ff9e1cc862b30" 6cc0f22a]:
{{{
#!CommitTicketReference repository=""
revision="6cc0f22a73970dd7c0d29d4d8d2ff9e1cc862b30"
Fixed #32095 -- Made QuerySet.update_or_create() save only fields passed
in defaults or with custom pre_save().
Thanks Florian Apolloner for the initial patch.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:13>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"1d77b931f7df96ec4d6fa3835fe35547397cca1a" 1d77b93]:
{{{
#!CommitTicketReference repository=""
revision="1d77b931f7df96ec4d6fa3835fe35547397cca1a"
Refs #32095 -- Added model's Options._non_pk_concrete_field_names
property.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32095#comment:12>