From 8b4efbc973ef560d1723f5672ffffe88e0ed9b20 Mon Sep 17 00:00:00 2001 From: Jeff Bradberry Date: Tue, 21 May 2024 11:08:47 -0400 Subject: [PATCH] Do not throw away the container of cross-linked parents Since we use it twice, the second time to get the id field of each. --- tools/scripts/ig-hotfix/role_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/scripts/ig-hotfix/role_check.py b/tools/scripts/ig-hotfix/role_check.py index 6ca653fc6c..3f11c5d5a8 100644 --- a/tools/scripts/ig-hotfix/role_check.py +++ b/tools/scripts/ig-hotfix/role_check.py @@ -98,8 +98,8 @@ for r in Role.objects.exclude(role_field__startswith='system_').order_by('id'): plus.add(p) if plus: - plus = [f"{x.content_type!r} {x.object_id} {x.role_field}" for x in plus] - sys.stderr.write(f"Role id={r.id} has cross-linked parents: {plus}\n") + plus_repr = [f"{x.content_type!r} {x.object_id} {x.role_field}" for x in plus] + sys.stderr.write(f"Role id={r.id} has cross-linked parents: {plus_repr}\n") crosslinked_parents[r.id].extend(x.id for x in plus) try: