fix: v2->v3 The issue of authorized accounts displaying as empty when there are more than 10,000 authorization rules.

pull/13335/head
Bai 6 months ago committed by Bryan
parent 5d1829b998
commit 4e8d7df005

@ -9,7 +9,7 @@ def migrate_system_user_to_accounts(apps, schema_editor):
bulk_size = 10000 bulk_size = 10000
while True: while True:
asset_permissions = asset_permission_model.objects \ 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: if not asset_permissions:
break break

Loading…
Cancel
Save