From 18afb4416ce0e9e22111be2340f336e22179bda9 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 4 Sep 2014 11:29:00 +0200 Subject: [PATCH] [gen] Bugfix in string.py (inline editing). --- fields/string.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fields/string.py b/fields/string.py index 75a858c..01c6552 100644 --- a/fields/string.py +++ b/fields/string.py @@ -185,7 +185,6 @@ class String(Field): pxEditTextArea = Px(''' @@ -833,10 +832,9 @@ class String(Field): requestValue = rq['fieldContent'] # Remember previous value if the field is historized. previousData = obj.rememberPreviousData([self]) - # We take a copy because the data is mutable (ie, a dict). - if previousData: - previousData[self.name] = previousData[self.name].copy() if self.isMultilingual(): + # We take a copy of previousData because it is mutable (dict). + previousData[self.name] = previousData[self.name].copy() # We get a partial value, for one language only. language = rq['languageOnly'] v = self.getUnilingualStorableValue(requestValue)