fix: password generation command line crash

This commit is contained in:
Éloi Rivard 2023-10-07 22:32:02 +02:00 committed by Baptiste Jonglez
parent e360ee7dfb
commit c2fc33a8ca

View file

@ -6,7 +6,7 @@ import random
import sys import sys
import click import click
from flask.cli import FlaskGroup from flask.cli import FlaskGroup, with_appcontext
from ihatemoney.models import Project, db from ihatemoney.models import Project, db
from ihatemoney.run import create_app from ihatemoney.run import create_app
@ -33,6 +33,7 @@ def runserver(ctx):
@click.command(name="generate_password_hash") @click.command(name="generate_password_hash")
@with_appcontext
def password_hash(): def password_hash():
"""Get password from user and hash it without printing it in clear text.""" """Get password from user and hash it without printing it in clear text."""
password = getpass.getpass(prompt="Password: ") password = getpass.getpass(prompt="Password: ")