cli: some options are not supplied in all _list_tasks calls

Fixes: https://pagure.io/koji/issue/2585
This commit is contained in:
Tomas Kopecek 2020-12-08 12:47:34 +01:00
parent e62f0c4800
commit 866c81cb63

View file

@ -757,12 +757,12 @@ def _list_tasks(options, session):
callopts = {
'decode': True,
}
if not options.all:
if not getattr(options, 'all', False):
callopts['state'] = [koji.TASK_STATES[s] for s in ('FREE', 'OPEN', 'ASSIGNED')]
if options.after:
if getattr(options, 'after', False):
callopts['startedAfter'] = options.after
if options.before:
if getattr(options, 'before', False):
callopts['startedBefore'] = options.before
if getattr(options, 'mine', False):