From e246808b933d3930e4e3cc18a7e552b5f42148db Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 11 Jan 2015 15:08:00 +0100 Subject: [PATCH] Task: Add comment to stress importance of refreshing after save --- tasklib/task.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasklib/task.py b/tasklib/task.py index 4dab528..0a74f6c 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -390,6 +390,9 @@ class Task(TaskResource): # Circumvent the ID storage, since ID is considered read-only self._data['id'] = int(id_lines[0].split(' ')[2].rstrip('.')) + # Refreshing is very important here, as not only modification time + # is updated, but arbitrary attribute may have changed due hooks + # altering the data before saving self.refresh() def add_annotation(self, annotation): -- 2.39.5