修复migrate bug

This commit is contained in:
feng626
2022-08-22 18:48:07 +08:00
parent a7d193464e
commit 97c6e2c0b2
4 changed files with 10 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ def migrate_system_user_to_account(apps, schema_editor):
while True:
connection_tokens = connection_token_model.objects \
.prefetch_related('system_users')[count:bulk_size]
.prefetch_related('system_user')[count:bulk_size]
if not connection_tokens:
break
count += len(connection_tokens)