This commit is contained in:
CHIEFSOFT\ameye
2025-09-22 09:21:09 -04:00
parent 4a5f2ee946
commit 714393a39b
4 changed files with 27 additions and 3 deletions
+2 -1
View File
@@ -5,4 +5,5 @@ class StartProfileSchema(Schema):
uid = fields.Str(required=True)
practice =fields.Str(required=True)
specialization =fields.Str(required=True)
introduction = fields.Str(required=True)
introduction = fields.Str(required=True)
url_name = fields.Str(required=True)
+13 -1
View File
@@ -220,6 +220,18 @@ class AccountService(BaseService):
practice = str(validated_data.get('practice'))
specialization = str(validated_data.get('specialization'))
introduction = str(validated_data.get('introduction'))
url_name = str(validated_data.get('url_name'))
#verify is anybody is using this url name
urlNammeData = MembersProfile.get_member_product_by_url_name(url_name)
if urlNammeData:
save_error = {
"error": 'Duplicate url name',
"error_message": 'Try another url name',
"url_name": url_name,
}
return ResponseHelper.error(data=save_error)
profile_uid = ''
profile_completed = None
member = Members.get_member_by_uid(uid)
@@ -242,7 +254,7 @@ class AccountService(BaseService):
profile_completed = member.profile_completed
else:
profle_result = MembersProfile.create_member_profile(member.id, practice, specialization,
introduction)
introduction,url_name)
if profle_result:
profile_uid = profle_result.uid
if profile_uid is not None and profile_uid != '':