fix: password generation command line crash

This commit is contained in:
Éloi Rivard 2023-10-07 22:32:02 +02:00
parent eb7338c76c
commit d2f4efed9a
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
2 changed files with 4 additions and 3 deletions

View file

@ -5,8 +5,8 @@ This document describes changes between each past release.
## 6.1.2 (unreleased) ## 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) ## 6.1.1 (2023-10-04)

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):
@cli.command(name="generate_password_hash") @cli.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: ")