From 621e459dfbd3d6e8e0d7a790dae4e14b092078ad Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Mon, 31 May 2021 22:45:30 -0700 Subject: [PATCH] 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 --- aurweb/models/user.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/aurweb/models/user.py b/aurweb/models/user.py index 3983e098..6c5c6e21 100644 --- a/aurweb/models/user.py +++ b/aurweb/models/user.py @@ -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():