feature/migrations, closes #19 #20
|
@ -1,4 +1,5 @@
|
||||||
import click
|
import click
|
||||||
|
import sqlalchemy.exc
|
||||||
from flask.cli import with_appcontext
|
from flask.cli import with_appcontext
|
||||||
from werkzeug.exceptions import NotFound
|
from werkzeug.exceptions import NotFound
|
||||||
|
|
||||||
|
@ -76,6 +77,7 @@ def user(add_role, delete, user):
|
||||||
elif add_role:
|
elif add_role:
|
||||||
role = roleController.get(add_role)
|
role = roleController.get(add_role)
|
||||||
user.roles_.append(role)
|
user.roles_.append(role)
|
||||||
|
userController.modify_user(user, None)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
except NotFound:
|
except NotFound:
|
||||||
ctx.fail(f"User not found {uid}")
|
ctx.fail(f"User not found {uid}")
|
||||||
|
|
Loading…
Reference in New Issue