Skip to content

Commit

Permalink
Specify custom type in ID3C click options for compatibility with clic…
Browse files Browse the repository at this point in the history
…k v8.x
  • Loading branch information
sallybg committed Jul 10, 2023
1 parent a34e2a0 commit 921c598
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/id3c/cli/command/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,22 @@ def decorator(command):
"action",
help="Only go through the motions of changing the database (default)",
flag_value=DatabaseSessionAction("rollback"),
type=DatabaseSessionAction,
default=True,
)
@click.option(
"--prompt",
"action",
help="Ask if changes to the database should be saved",
flag_value=DatabaseSessionAction("prompt"),
type=DatabaseSessionAction,
)
@click.option(
"--commit",
"action",
help="Save changes to the database",
flag_value=DatabaseSessionAction("commit"),
type=DatabaseSessionAction,
)
@wraps(command)
def decorated(*args, action, **kwargs):
Expand Down

0 comments on commit 921c598

Please sign in to comment.