mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-10-14 02:31:58 +00:00
move blueprints in dedicated folder
This commit is contained in:
12
app/blueprints/users/cli.py
Normal file
12
app/blueprints/users/cli.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from app.models import User
|
||||
from app import db
|
||||
from . import bp
|
||||
|
||||
|
||||
@bp.cli.command('reset')
|
||||
def reset():
|
||||
''' Reset terms of use accept '''
|
||||
for user in [x for x in User.query.all() if x.terms_of_use_accepted]:
|
||||
print(f'Resetting user {user.username}')
|
||||
user.terms_of_use_accepted = False
|
||||
db.session.commit()
|
Reference in New Issue
Block a user