diff --git a/src/sentry/deletions/defaults/project.py b/src/sentry/deletions/defaults/project.py index 9d34ce5b533c1c..6f1bd0a0dadf06 100644 --- a/src/sentry/deletions/defaults/project.py +++ b/src/sentry/deletions/defaults/project.py @@ -47,7 +47,7 @@ def get_child_relations(self, instance): ] # in bulk - for m in ( + for m1 in ( Activity, AlertRuleProjects, EnvironmentProject, @@ -81,7 +81,7 @@ def get_child_relations(self, instance): DiscoverSavedQueryProject, IncidentProject, ): - relations.append(ModelRelation(m, {"project_id": instance.id}, BulkModelDeletionTask)) + relations.append(ModelRelation(m1, {"project_id": instance.id}, BulkModelDeletionTask)) relations.append(ModelRelation(Monitor, {"project_id": instance.id})) relations.append(ModelRelation(Group, {"project_id": instance.id})) @@ -95,11 +95,11 @@ def get_child_relations(self, instance): # Release needs to handle deletes after Group is cleaned up as the foreign # key is protected - for m in ( + for m2 in ( ReleaseProject, ReleaseProjectEnvironment, EventAttachment, ProjectDebugFile, ): - relations.append(ModelRelation(m, {"project_id": instance.id}, ModelDeletionTask)) + relations.append(ModelRelation(m2, {"project_id": instance.id}, ModelDeletionTask)) return relations