From c2fc33a8ca44fc6e867d84b77d1ca7c695879929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Sat, 7 Oct 2023 22:32:02 +0200 Subject: [PATCH] fix: password generation command line crash --- ihatemoney/manage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ihatemoney/manage.py b/ihatemoney/manage.py index 6ba2277f..8343c982 100755 --- a/ihatemoney/manage.py +++ b/ihatemoney/manage.py @@ -6,7 +6,7 @@ import random import sys import click -from flask.cli import FlaskGroup +from flask.cli import FlaskGroup, with_appcontext from ihatemoney.models import Project, db from ihatemoney.run import create_app @@ -33,6 +33,7 @@ def runserver(ctx): @click.command(name="generate_password_hash") +@with_appcontext def password_hash(): """Get password from user and hash it without printing it in clear text.""" password = getpass.getpass(prompt="Password: ")