From: Tomas Babej Date: Sat, 7 Feb 2015 12:50:08 +0000 (+0100) Subject: TaskResource: Provide read-only view on _original_data via original attribute X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/6220d716c07a841b77fba60d50d1e2b57851af84 TaskResource: Provide read-only view on _original_data via original attribute --- diff --git a/tasklib/task.py b/tasklib/task.py index dc27460..17af8d4 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -424,6 +424,9 @@ class Task(TaskResource): for (key, value) in six.iteritems(kwargs)) self._original_data = copy.deepcopy(self._data) + # Provide read only access to the original data + self.original = ReadOnlyDictView(self._original_data) + def __unicode__(self): return self['description']