From ba93345a0938c94751a8a394d9db0ae1630e1bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Sat, 18 Feb 2023 15:48:53 +0100 Subject: [PATCH] feat(users) fix cli if user get role, that provider is updatet too --- flaschengeist/plugins/users/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flaschengeist/plugins/users/cli.py b/flaschengeist/plugins/users/cli.py index b5f6469..5e69d91 100644 --- a/flaschengeist/plugins/users/cli.py +++ b/flaschengeist/plugins/users/cli.py @@ -1,4 +1,5 @@ import click +import sqlalchemy.exc from flask.cli import with_appcontext from werkzeug.exceptions import NotFound @@ -76,6 +77,7 @@ def user(add_role, delete, user): elif add_role: role = roleController.get(add_role) user.roles_.append(role) + userController.modify_user(user, None) db.session.commit() except NotFound: ctx.fail(f"User not found {uid}")