X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/dcbdcdd11c981b4600ea4a5522230d0456e45d21..4a289416db9f24d81cacd14da40f5db196454e79:/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'])