@@ -69,26 +69,26 @@ def edit_profile():
6969 try :
7070 birthdate = datetime .datetime .strptime (birthdate , "%d/%m/%Y" ).date ()
7171 except ValueError :
72- raise BadRequestError ("Birthdate format must be %d/%m/%Y (day/month/year)" , "Try again" )
72+ raise BadRequestError ("Birthdate format must be %d/%m/%Y (day/month/year)" )
7373
7474 today = datetime .datetime .utcnow ()
7575
7676 age = today .year - birthdate .year - ((today .month , today .day ) < (birthdate .month , birthdate .day ))
7777 if age < 18 :
78- raise BadRequestError ("You must be 18 years old or older" , "Try again later" )
78+ raise BadRequestError ("You must be 18 years old or older" )
7979
8080 try :
8181 get_user (username )
8282 except NotFoundError :
8383 pass
8484 else :
85- raise BadRequestError ("Username taken" , "Try again" )
85+ raise BadRequestError ("Username taken" )
8686
8787 if orientation not in ["heterosexual" , "homosexual" , "bisexual" , "other" ]:
88- raise BadRequestError ("Orientation must be heterosexual, homosexual, bisexual or other" , "Try again" )
88+ raise BadRequestError ("Orientation must be heterosexual, homosexual, bisexual or other" )
8989
9090 if gender not in ["male" , "female" , "other" ]:
91- raise BadRequestError ("Gender must be male, female or other" , "Try again" )
91+ raise BadRequestError ("Gender must be male, female or other" )
9292
9393 current_user .first_name = first_name
9494 current_user .last_name = last_name
@@ -108,7 +108,7 @@ def edit_email():
108108 data = request .get_json ()
109109 new_email = data ["email" ].lower ()
110110 if current_user .email == new_email :
111- raise BadRequestError ("The new email is the same as the old one !" , "Try again" )
111+ raise BadRequestError ("The new email is the same as the old one !" )
112112 current_user .email = new_email
113113 current_user .is_confirmed = False
114114 current_user .save ()
@@ -127,7 +127,7 @@ def edit_password():
127127 old_password = data ["old_password" ]
128128 new_password = data ["new_password" ]
129129 if not current_user .check_password (old_password ):
130- raise UnauthorizedError ("Incorrect password" , "Try again" )
130+ raise UnauthorizedError ("Incorrect password" )
131131 current_user .password = hash_password (new_password )
132132 current_user .save ()
133133 send_mail_text .delay (
0 commit comments