Skip to content
Snippets Groups Projects
Commit 3344480f authored by Steven Loria's avatar Steven Loria
Browse files

Don't try to set password if it isn't passed in

parent 4aea7377
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,8 @@ class User(db.Model):
def __init__(self, username=None, email=None, password=None):
self.username = username
self.email = email
self.set_password(password)
if password:
self.set_password(password)
def set_password(self, password):
self.password = pwd_context.encrypt(password)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment