X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/5c5b35a097608b63c3d54acf2f07d5cb00e85796..15c5d693afb61c72f6a6984c25dacb8610b2d9a8:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index b7bba4b..3f53511 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -637,11 +637,7 @@ class Task(TaskResource): elif self.deleted: raise Task.DeletedTask("Deleted task cannot be completed") - # Older versions of TW do not stop active task at completion - if self.warrior.version < VERSION_2_4_0 and self.active: - self.stop() - - self.warrior.execute_command([self['uuid'], 'done']) + self.backend.complete_task(self) # Refresh the status again, so that we have updated info stored self.refresh(only_fields=['status', 'start', 'end'])