Commit 372b7c16 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

do not convert to Pdata if value is None in _setBaseData() and _setData()....

do not convert to Pdata if value is None in _setBaseData() and _setData(). thank to Romain for reporting the bug.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28374 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bd683610
......@@ -1377,6 +1377,8 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, ConversionCacheMixin, Sna
security.declareProtected(Permissions.ModifyPortalContent, '_setBaseData')
def _setBaseData(self, data):
if data is not None:
data = Pdata(data)
self._baseSetBaseData(Pdata(data))
security.declareProtected(Permissions.AccessContentsInformation,
......@@ -1391,7 +1393,9 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, ConversionCacheMixin, Sna
security.declareProtected(Permissions.ModifyPortalContent, '_setData')
def _setData(self, data):
self._baseSetData(Pdata(data))
if data is not None:
data = Pdata(data)
self._baseSetData(data)
security.declareProtected(Permissions.AccessContentsInformation, 'getData')
def getData(self, default=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment