mirror of https://github.com/jumpserver/jumpserver
Merge pull request #10127 from jumpserver/pr@dev@fix_systemuser_without_username_migrate_error
fix: 优化系统用户迁移pull/10131/head
commit
98a2d9ffdb
|
@ -49,7 +49,10 @@ def migrate_asset_accounts(apps, schema_editor):
|
||||||
account_values.update(auth_book_auth)
|
account_values.update(auth_book_auth)
|
||||||
|
|
||||||
auth_infos = []
|
auth_infos = []
|
||||||
username = account_values['username']
|
username = account_values.get('username')
|
||||||
|
if not username:
|
||||||
|
continue
|
||||||
|
|
||||||
for attr in auth_attrs:
|
for attr in auth_attrs:
|
||||||
secret = account_values.pop(attr, None)
|
secret = account_values.pop(attr, None)
|
||||||
if not secret:
|
if not secret:
|
||||||
|
|
Loading…
Reference in New Issue