Skip to content

Commit

Permalink
Raising the exception properly.
Browse files Browse the repository at this point in the history
Signed-off-by: victor <victor@seita.nl>
  • Loading branch information
victorgarcia98 committed Mar 22, 2023
1 parent 35e017d commit 1434416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flexmeasures/cli/data_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ def add_toy_account(kind: str, name: str):
account = Account.query.filter(Account.name == name).one_or_none()
if account:
click.echo(f"Account {name} already exists.")
return click.Abort()
raise click.Abort()
# make an account user (account-admin?)
email = "toy-user@flexmeasures.io"
user = User.query.filter_by(email=email).one_or_none()
Expand Down

0 comments on commit 1434416

Please sign in to comment.