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:
Simon Charette 2022-08-17 19:21:10 -04:00 committed by Mariusz Felisiak
parent 081871bc20
commit a9be1dc551
1 changed files with 0 additions and 5 deletions

View File

@ -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)