From f9d9494a3634d373c97dc1754906757759429bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 3 Dec 2021 09:49:10 +0100 Subject: [PATCH] [fix] add empty install function for userController, fix wrong indention --- flaschengeist/controller/userController.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/flaschengeist/controller/userController.py b/flaschengeist/controller/userController.py index 2c81e64..d0f85bf 100644 --- a/flaschengeist/controller/userController.py +++ b/flaschengeist/controller/userController.py @@ -33,6 +33,10 @@ def _generate_password_reset(user): return reset +def install(): + pass + + def login_user(username, password): logger.info("login user {{ {} }}".format(username)) @@ -183,8 +187,8 @@ def delete_user(user: User): db.session.commit() try: # Delete the user - db.session.delete(user) - db.session.commit() + db.session.delete(user) + db.session.commit() except exc.IntegrityError: logger.error("Delete of user failed, there might be ForeignKey contraits from disabled plugins", exec_info=True) # Remove at least all personal data @@ -197,8 +201,6 @@ def delete_user(user: User): db.session.commit() - - def register(data): allowed_keys = User().serialize().keys() values = {key: value for key, value in data.items() if key in allowed_keys}