fix url issues
This commit is contained in:
@@ -7,7 +7,7 @@ from marshmallow import ValidationError
|
||||
from app.api.enums import TransactionType
|
||||
# from app.api.integrations import SimbrellaIntegration
|
||||
from app.extensions import db
|
||||
from app.models import Members, MembersActions, MembersProfile, Payments
|
||||
from app.models import Members, MembersActions, MembersProfile, Payments, MembersProducts
|
||||
# from app.api.services.offer_analysis import OfferAnalysis
|
||||
from app.api.helpers.response_helper import ResponseHelper
|
||||
from werkzeug.security import generate_password_hash, check_password_hash
|
||||
@@ -223,7 +223,7 @@ class AccountService(BaseService):
|
||||
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)
|
||||
urlNammeData = MembersProfile.get_any_member_profile_by_url_name(url_name)
|
||||
if urlNammeData:
|
||||
return {
|
||||
"error": 'Duplicate url name',
|
||||
@@ -252,11 +252,13 @@ class AccountService(BaseService):
|
||||
profile_uid = current_profile.uid
|
||||
profile_completed = member.profile_completed
|
||||
else:
|
||||
profle_result = MembersProfile.create_member_profile(member.id, practice, specialization,
|
||||
profile_result = MembersProfile.create_member_profile(member.id, practice, specialization,
|
||||
introduction,url_name)
|
||||
if profle_result:
|
||||
profile_uid = profle_result.uid
|
||||
if profile_uid is not None and profile_uid != '':
|
||||
if profile_result:
|
||||
profile_uid = profile_result.uid
|
||||
|
||||
current_profile = MembersProfile.get_member_profile_by_member_id(member.id)
|
||||
if profile_uid is not None and profile_uid != '' and current_profile is not None:
|
||||
profile_completed = Members.set_member_profile_completed(member_data['uid'])
|
||||
|
||||
result_data = {
|
||||
|
||||
Reference in New Issue
Block a user