Commit 02e1bfd8 authored by Jacek Sowiński's avatar Jacek Sowiński

Bugfix for postpone

Show 'Invalid todo number: {number}.' messages also when *all* of
supplied todo numbers are invalid. Before this commit it were returning
synopsis in such situation.
parent c1920841
...@@ -67,7 +67,7 @@ class PostponeCommand(Command): ...@@ -67,7 +67,7 @@ class PostponeCommand(Command):
except InvalidTodoException: except InvalidTodoException:
invalid_numbers.append(number) invalid_numbers.append(number)
if len(invalid_numbers) > 0 and len(todos) > 0: if len(invalid_numbers) > 1 or len(invalid_numbers) > 0 and len(todos) > 0:
for number in invalid_numbers: for number in invalid_numbers:
self.error("Invalid todo number given: {}.".format(number)) self.error("Invalid todo number given: {}.".format(number))
elif len(invalid_numbers) == 1 and len(todos) == 0: elif len(invalid_numbers) == 1 and len(todos) == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment