fix(cliapp): Show a message if a user can not be found

This commit is contained in:
Maarten de Waard 2022-07-18 15:02:51 +02:00
parent 3a12949372
commit aa182459f0
No known key found for this signature in database
GPG key ID: 1D3E893A657CC8DA

View file

@ -165,6 +165,7 @@ def show_user(email):
:param email: Email address of the user to show
"""
user = KratosUser.find_by_email(KRATOS_ADMIN, email)
if user is not None:
print(user)
print("")
print(f"UUID: {user.uuid}")
@ -172,6 +173,8 @@ def show_user(email):
print(f"Updated: {user.updated_at}")
print(f"Created: {user.created_at}")
print(f"State: {user.state}")
else:
print(f"User with email address '{email}' was not found")
@user_cli.command("update")