Commenting out some entries on edit_profile endpoint

This commit is contained in:
Yusur 2019-11-20 12:30:40 +01:00
parent 621d8cf2c8
commit 42552f12be

View file

@ -261,9 +261,9 @@ def edit_profile(user):
full_name = data['full_name'] or username full_name = data['full_name'] or username
if full_name != user.full_name: if full_name != user.full_name:
User.update(full_name=full_name).where(User.id == user.id).execute() User.update(full_name=full_name).where(User.id == user.id).execute()
website = data['website'].strip().replace(' ', '%20') #website = data['website'].strip().replace(' ', '%20')
if website and not validate_website(website): #if website and not validate_website(website):
raise ValueError('You should enter a valid URL.') # raise ValueError('You should enter a valid URL.')
#location = int(request.form.get('location')) #location = int(request.form.get('location'))
#if location == 0: #if location == 0:
# location = None # location = None
@ -272,9 +272,9 @@ def edit_profile(user):
#year=data['year'] if data.get('has_year') else None, #year=data['year'] if data.get('has_year') else None,
#location=location, #location=location,
website=website, website=website,
instagram=data['instagram'], #instagram=data['instagram'],
facebook=data['facebook'], #facebook=data['facebook'],
telegram=data['telegram'] #telegram=data['telegram']
).where(UserProfile.user == user).execute() ).where(UserProfile.user == user).execute()
return {} return {}