Fix for issue
Refactor to avoid setting password twice during new user creation.
@@ -244,9 +244,10 @@ def create_user(email, role):
sys.stderr.write("[!] Passwords do not match\n")
sys.exit(1)
- user.role = role
user.password = encrypt_password(password1)
+ user.role = role
+
db.session.add(user)
db.session.commit()
