Commit 567affc6 authored by Kevin Morris's avatar Kevin Morris
Browse files

aurweb.models.user: Remove session.commit() from construction



We don't want to do this on construction. We only want to do this
when we want to actually add the user to the database (or modify it).
Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 01beb506
Pipeline #7898 passed with stage
in 2 minutes and 46 seconds
......@@ -51,11 +51,9 @@ class User:
self.update_password(passwd)
def update_password(self, password, salt_rounds=12):
from aurweb.db import session
self.Passwd = bcrypt.hashpw(
password.encode(),
bcrypt.gensalt(rounds=salt_rounds)).decode()
session.commit()
@staticmethod
def minimum_passwd_length():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment