perf: account name required (#9533)

Co-authored-by: feng <1304903146@qq.com>
pull/9535/head
fit2bot 2023-02-14 11:37:18 +08:00 committed by GitHub
parent 80903d1218
commit 10d776f7e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -77,5 +77,6 @@ class BaseAccountSerializer(AuthValidateMixin, BulkOrgResourceModelSerializer):
'date_verified', 'created_by', 'date_created',
]
extra_kwargs = {
'name': {'required': True},
'spec_info': {'label': _('Spec info')},
}

View File

@ -60,7 +60,7 @@ class AssetAccountSerializer(
template = serializers.BooleanField(
default=False, label=_("Template"), write_only=True
)
name = serializers.CharField(max_length=128, required=False, label=_("Name"))
name = serializers.CharField(max_length=128, required=True, label=_("Name"))
class Meta:
model = Account