Fix bug where day and year both being specified together was not checked properly
parent
9b2077780f
commit
bbf2b25719
|
@ -204,7 +204,7 @@ class FetchCommand(click.Command):
|
||||||
def invoke(self, ctx: click.Context):
|
def invoke(self, ctx: click.Context):
|
||||||
year = ctx.params.get("year")
|
year = ctx.params.get("year")
|
||||||
day = ctx.params.get("day")
|
day = ctx.params.get("day")
|
||||||
if (year and not day) or (not day and year):
|
if (year and not day) or (day and not year):
|
||||||
raise click.ClickException("day and year must be specified together")
|
raise click.ClickException("day and year must be specified together")
|
||||||
|
|
||||||
return super().invoke(ctx)
|
return super().invoke(ctx)
|
||||||
|
|
Loading…
Reference in New Issue