Refs #27852 -- Renamed a loop variable in Collector.collect() to avoid redefinition.

This commit is contained in:
Mariusz Felisiak 2020-01-28 20:26:00 +01:00
parent f791673537
commit 2a6fc89018
1 changed files with 2 additions and 2 deletions

View File

@ -324,8 +324,8 @@ class Collector:
if fail_on_restricted:
# Raise an error if collected restricted objects (RESTRICT) aren't
# candidates for deletion also collected via CASCADE.
for model, instances in self.data.items():
self.clear_restricted_objects_from_set(model, instances)
for related_model, instances in self.data.items():
self.clear_restricted_objects_from_set(related_model, instances)
for qs in self.fast_deletes:
self.clear_restricted_objects_from_queryset(qs.model, qs)
for model, fields in self.restricted_objects.items():