- Timestamp:
- Jan 3, 2021, 3:45:09 PM (6 years ago)
- Branches:
- debian/bullseye, master
- Children:
- 4567d1c
- Parents:
- 8c899f7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnuboat/mapservice_impl/controllers/users_controller.py
r8c899f7 r2175c7a 109 109 detail='Email contains more than one @, no @ or no .' 110 110 ) 111 if len(User.query.filter_by(username=user_creation.username).all()) > 0: 112 # Make sure, that the username is not already in use 113 raise GnuboatBadRequest(detail='Username is already in use. Please choose another username.') 111 114 if (user_creation.license_accepted is None or 112 115 not user_creation.license_accepted): … … 114 117 detail='You must accept the license to register an account' 115 118 ) 119 116 120 117 121 # add user to the database … … 141 145 activation_url=activation_url 142 146 ) 143 mail.send(message) 147 try: 148 mail.send(message) 149 except: 150 print('WARNING: Could not send mail') 144 151 145 152 return user_to_dict(user)
Note:
See TracChangeset
for help on using the changeset viewer.
