fix(cliapp): Show a message if a user can not be found
This commit is contained in:
parent
3a12949372
commit
aa182459f0
1 changed files with 10 additions and 7 deletions
|
@ -165,13 +165,16 @@ def show_user(email):
|
||||||
:param email: Email address of the user to show
|
:param email: Email address of the user to show
|
||||||
"""
|
"""
|
||||||
user = KratosUser.find_by_email(KRATOS_ADMIN, email)
|
user = KratosUser.find_by_email(KRATOS_ADMIN, email)
|
||||||
print(user)
|
if user is not None:
|
||||||
print("")
|
print(user)
|
||||||
print(f"UUID: {user.uuid}")
|
print("")
|
||||||
print(f"Username: {user.username}")
|
print(f"UUID: {user.uuid}")
|
||||||
print(f"Updated: {user.updated_at}")
|
print(f"Username: {user.username}")
|
||||||
print(f"Created: {user.created_at}")
|
print(f"Updated: {user.updated_at}")
|
||||||
print(f"State: {user.state}")
|
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")
|
@user_cli.command("update")
|
||||||
|
|
Loading…
Reference in a new issue