From 0773ca6eb07f483a3ac857cf8525124bb044f73f Mon Sep 17 00:00:00 2001 From: Niels Perfors Date: Sun, 22 Sep 2024 13:09:31 +0000 Subject: [PATCH] fix missing option --- src/sapcommissions/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sapcommissions/__main__.py b/src/sapcommissions/__main__.py index d54a2f2..1098739 100644 --- a/src/sapcommissions/__main__.py +++ b/src/sapcommissions/__main__.py @@ -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(