Skip to content

Commit

Permalink
fix missing option
Browse files Browse the repository at this point in the history
  • Loading branch information
niro1987 committed Sep 22, 2024
1 parent ae20a31 commit 0773ca6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sapcommissions/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def list_periods(

def validate_period(ctx: click.Context, _, value):
"""Validate the Period input."""
if value is None:
return
if not (calendar_name := ctx.params.get("calendar", None)):
raise click.BadParameter("Must provide Calendar before Period.")
period_names = list_periods(
Expand Down

0 comments on commit 0773ca6

Please sign in to comment.