解决企业名称异常

This commit is contained in:
王思川 2022-04-11 11:26:55 +08:00
parent 0e6eae0dba
commit 6065ced0a4
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ class CompanyUserImpl(CompanyUser):
check_user_existed()
check_password_correct()
self.name = company_user['企业名称']
self.name = "企业用户" if company_user['企业名称'] is None else company_user['企业名称']
self.verify_status = company_user['已认证']
return_body = self.dict_to_show(columns=["企业名称", "认证状态", "token"])

View File

@ -28,7 +28,7 @@ class VerifyInfo(object):
class CompanyUser(object):
"""企业用户"""
cid = ValidateAttr(field='cid', type=str, length=8, error_info='企业ID异常', error_code=200)
name = ValidateAttr(field='name', type=str, default=None, error_info='企业名称异常', error_code=200)
name = ValidateAttr(field='name', type=str, error_info='企业名称异常', error_code=200)
email = ValidateAttr(field='email', func=Validate.email, error_info='邮箱格式异常', error_code=200)
pwd = ValidateAttr(field='pwd', func=Validate.password, error_info='密码强度异常', error_code=200)
avatar_id = ValidateAttr(field='avatar_id', type=str, length=24, error_info='头像ID异常', error_code=200)