From 6220d716c07a841b77fba60d50d1e2b57851af84 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 7 Feb 2015 13:50:08 +0100 Subject: [PATCH] TaskResource: Provide read-only view on _original_data via original attribute --- tasklib/task.py | 3 +++ 1 file changed, 3 insertions(+) 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'] -- 2.39.5