Fix bug where day and year both being specified together was not checked properly

master
Nick Krichevsky 2022-12-18 16:32:06 -05:00
parent 9b2077780f
commit bbf2b25719
1 changed files with 1 additions and 1 deletions

View File

@ -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)