From bce776bb630bfe29fbf9f635e9e33c49db4e1fd2 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 7 May 2024 11:42:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20v2=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=88=B0=20v3=20=E6=8E=88=E6=9D=83=E7=9A=84=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E7=99=BB=E5=BD=95=E7=B3=BB=E7=BB=9F=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 3915b8b1a..fb1c3ad2e 100644 --- a/apps/perms/migrations/0030_auto_20220816_1132.py +++ b/apps/perms/migrations/0030_auto_20220816_1132.py @@ -16,7 +16,7 @@ def migrate_system_user_to_accounts(apps, schema_editor): count += len(asset_permissions) updated = [] for asset_permission in asset_permissions: - asset_permission.accounts = [s.username for s in asset_permission.system_users.all()] + asset_permission.accounts = [s.username for s in asset_permission.system_users.all() if s.username.strip()] updated.append(asset_permission) asset_permission_model.objects.bulk_update(updated, ['accounts'])