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

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

@ -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