Commit efff0cb3 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Make sure not to return negative lengths.

parent 5bcb0593
...@@ -66,7 +66,7 @@ class Todo(TodoBase.TodoBase): ...@@ -66,7 +66,7 @@ class Todo(TodoBase.TodoBase):
start = self.start_date() start = self.start_date()
due = self.due_date() due = self.due_date()
if start and due: if start and due and start < due:
diff = due - start diff = due - start
return diff.days return diff.days
else: else:
......
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