diff --git a/product/ERP5Type/patches/DateTimePatch.py b/product/ERP5Type/patches/DateTimePatch.py index 5dea0db3d5490f9384837db24718a29f3ec8d1a7..a5a582f3a195781a84a23f65f4469d6eab9e6174 100644 --- a/product/ERP5Type/patches/DateTimePatch.py +++ b/product/ERP5Type/patches/DateTimePatch.py @@ -34,7 +34,14 @@ SyntaxError, DateError, TimeError, localtime, time STATE_KEY = 'str' -original_DateTime__setstate__ = DateTimeKlass.__setstate__ +try: + original_DateTime__setstate__ = DateTimeKlass.__setstate__ +except AttributeError: + # BBB: Running on Zope < 2.11 + def original_DateTime__setstate__(self, state): + dikt = self.__dict__ + dikt.clear() + dikt.update(state) def DateTime__setstate__(self, state): self.__dict__.clear()