fix: 账号导入500

pull/10523/head
feng 2023-05-22 11:29:20 +08:00 committed by Jiangjie.Bai
parent c4b25fbdbd
commit d4bb501ef9
1 changed files with 3 additions and 3 deletions

View File

@ -22,8 +22,8 @@ logger = get_logger(__name__)
class AccountCreateUpdateSerializerMixin(serializers.Serializer):
template = serializers.PrimaryKeyRelatedField(
queryset=AccountTemplate.objects,
required=False, label=_("Template"), write_only=True
queryset=AccountTemplate.objects, required=False,
label=_("Template"), write_only=True, allow_null=True
)
push_now = serializers.BooleanField(
default=False, label=_("Push now"), write_only=True
@ -33,7 +33,7 @@ class AccountCreateUpdateSerializerMixin(serializers.Serializer):
)
on_invalid = LabeledChoiceField(
choices=AccountInvalidPolicy.choices, default=AccountInvalidPolicy.ERROR,
write_only=True, label=_('Exist policy')
write_only=True, allow_null=True, label=_('Exist policy'),
)
_template = None
clean_auth_fields: callable