Browse Source

fix: 模版批量添加提示异常(core 代码bug) (#10455)

Co-authored-by: feng <1304903146@qq.com>
pull/10463/head
fit2bot 2 years ago committed by GitHub
parent
commit
ec10ee3298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/accounts/serializers/account/account.py

2
apps/accounts/serializers/account/account.py

@ -303,7 +303,7 @@ class AssetAccountBulkSerializer(
su_from = validated_data.get('su_from')
su_from_username = validated_data.pop('su_from_username', None)
if template:
su_from = template.get_su_from_account()
su_from = template.get_su_from_account(asset)
elif su_from_username:
su_from = asset.accounts.filter(username=su_from_username).first()
validated_data['su_from'] = su_from

Loading…
Cancel
Save