diff --git a/CHANGELOG.md b/CHANGELOG.md index e32bc7de..a072acfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,8 @@ This document describes changes between each past release. ## 6.1.2 (unreleased) -- Nothing changed yet. - +### Fixed +- Fix a password generation command line crash introduced by #1214 (#1242) ## 6.1.1 (2023-10-04) diff --git a/ihatemoney/manage.py b/ihatemoney/manage.py index 69563f0d..82cac7a2 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): @cli.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: ")