perf: 优化账号列表-添加账号切换自用户字段必填的问题

pull/10477/head
Bai 2023-05-17 14:02:35 +08:00 committed by Jiangjie.Bai
parent 9058a79c5c
commit 04e95d378c
1 changed files with 2 additions and 1 deletions

View File

@ -241,7 +241,8 @@ class AssetAccountBulkSerializer(
AccountCreateUpdateSerializerMixin, AuthValidateMixin, serializers.ModelSerializer AccountCreateUpdateSerializerMixin, AuthValidateMixin, serializers.ModelSerializer
): ):
su_from_username = serializers.CharField( su_from_username = serializers.CharField(
max_length=128, required=False, write_only=True, allow_null=True, label=_("Su from") max_length=128, required=False, write_only=True, allow_null=True, label=_("Su from"),
allow_blank=True,
) )
assets = serializers.PrimaryKeyRelatedField(queryset=Asset.objects, many=True, label=_('Assets')) assets = serializers.PrimaryKeyRelatedField(queryset=Asset.objects, many=True, label=_('Assets'))