From 4e8d7df0050879d3e0b12825777b4ce0247638c8 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 28 May 2024 16:04:15 +0800 Subject: [PATCH] fix: v2->v3 The issue of authorized accounts displaying as empty when there are more than 10,000 authorization rules. --- apps/perms/migrations/0030_auto_20220816_1132.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/perms/migrations/0030_auto_20220816_1132.py b/apps/perms/migrations/0030_auto_20220816_1132.py index fb1c3ad2e..46cdd6316 100644 --- a/apps/perms/migrations/0030_auto_20220816_1132.py +++ b/apps/perms/migrations/0030_auto_20220816_1132.py @@ -9,7 +9,7 @@ def migrate_system_user_to_accounts(apps, schema_editor): bulk_size = 10000 while True: asset_permissions = asset_permission_model.objects \ - .prefetch_related('system_users')[count:bulk_size] + .prefetch_related('system_users')[count:count+bulk_size] if not asset_permissions: break