Skip to content

Commit 0906a3b

Browse files
committed
Fix error
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 10eb07a commit 0906a3b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vulnerabilities/pipelines/remove_duplicate_advisories.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def recompute_content_ids(self):
6868
Recompute content IDs for all advisories.
6969
"""
7070

71-
advisories = []
71+
advisories_list = []
7272

7373
advisories = Advisory.objects.exclude(unique_content_id__length=64)
7474

@@ -82,12 +82,12 @@ def recompute_content_ids(self):
8282

8383
for advisory in progress.iter(advisories.paginated(per_page=batch_size)):
8484
advisory.unique_content_id = compute_content_id(advisory.to_advisory_data())
85-
advisories.append(advisory)
86-
if len(advisories) % batch_size == 0:
85+
advisories_list.append(advisory)
86+
if len(advisories_list) % batch_size == 0:
8787
Advisory.objects.bulk_update(
88-
advisories, ["unique_content_id"], batch_size=batch_size
88+
advisories_list, ["unique_content_id"], batch_size=batch_size
8989
)
90-
advisories = []
90+
advisories_list = []
9191

9292
if advisories:
9393
Advisory.objects.bulk_update(advisories, ["unique_content_id"], batch_size=batch_size)

0 commit comments

Comments
 (0)