mirror of https://github.com/django/django.git
Refs #33928 -- Removed unnecessary attribute assignment on on-delete updates.
Model instances retrieved for bulk field update purposes are not exposed to the outside world and thus are not required to be kept update to date.
This commit is contained in:
parent
081871bc20
commit
a9be1dc551
|
@ -497,11 +497,6 @@ class Collector:
|
|||
origin=self.origin,
|
||||
)
|
||||
|
||||
# update collected instances
|
||||
for instances_for_fieldvalues in self.field_updates.values():
|
||||
for (field, value), instances in instances_for_fieldvalues.items():
|
||||
for obj in instances:
|
||||
setattr(obj, field.attname, value)
|
||||
for model, instances in self.data.items():
|
||||
for instance in instances:
|
||||
setattr(instance, model._meta.pk.attname, None)
|
||||
|
|
Loading…
Reference in New Issue