diff --git a/fields/string.py b/fields/string.py index 3e5a9dd..4988a29 100644 --- a/fields/string.py +++ b/fields/string.py @@ -908,12 +908,14 @@ class String(Field): rq = obj.REQUEST if rq.get('cancel') == 'True': return requestValue = rq['fieldContent'] - # Remember previous value if the field is historized. + # Remember previous value if the field is historized previousData = obj.rememberPreviousData([self]) if self.isMultilingual(obj): - # 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. + # We take a copy of previousData because it is mutable (dict) + prevData = previousData[self.name] + if prevData != None: prevData = prevData.copy() + previousData[self.name] = prevData + # We get a partial value, for one language only language = rq['languageOnly'] v = self.getUnilingualStorableValue(obj, requestValue) getattr(obj.aq_base, self.name)[language] = v diff --git a/pod/renderer.py b/pod/renderer.py index d60dc30..21ad744 100644 --- a/pod/renderer.py +++ b/pod/renderer.py @@ -461,7 +461,7 @@ class Renderer: return self.stylesManager.styles def setStylesMapping(self, stylesMapping): - '''Establishes a correspondance between, on one hand, CSS styles or + '''Establishes a correspondence between, on one hand, CSS styles or XHTML tags that will be found inside XHTML content given to POD, and, on the other hand, ODT styles found into the template.''' try: