From 2b8d0a64fbc628454608ae91d8142b9b18bb53d5 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 4 Apr 2023 10:31:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/migrations/0100_auto_20220711_1413.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/assets/migrations/0100_auto_20220711_1413.py b/apps/assets/migrations/0100_auto_20220711_1413.py index cd5732630..87eed5fb0 100644 --- a/apps/assets/migrations/0100_auto_20220711_1413.py +++ b/apps/assets/migrations/0100_auto_20220711_1413.py @@ -49,7 +49,10 @@ def migrate_asset_accounts(apps, schema_editor): account_values.update(auth_book_auth) auth_infos = [] - username = account_values['username'] + username = account_values.get('username') + if not username: + continue + for attr in auth_attrs: secret = account_values.pop(attr, None) if not secret: