Skip to content

Commit

Permalink
Early exit sanity check loop in user modify cmd
Browse files Browse the repository at this point in the history
to prevent WARNING when user wants to clear by passing `--threepid '' ''`.
  • Loading branch information
JOJ0 committed Nov 13, 2023
1 parent b5f2f4a commit b84a4c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions synadm/cli/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ def modify(ctx, helper, user_id, password, password_prompt, display_name,
if key in ["user_id", "password", "password_prompt"]: # skip these
continue
if key == "threepid":
if value == (('', ''),):
click.echo("threepid: All entries will be cleared!")
continue
for t_key, t_val in value:
click.echo(f"{key}: {t_key} {t_val}")
if t_key not in ["email", "msisdn"]:
Expand Down

0 comments on commit b84a4c2

Please sign in to comment.