Commit c3dad2c4 authored by Jérome Perrin's avatar Jérome Perrin

getModificationDate: sometimes _p_serial cannot be used for DateTime (...

getModificationDate: sometimes _p_serial cannot be used for DateTime ( TimeError: The time -2208988800.000000 is beyond the range of this Python implementation. )
parent e61ed61c
......@@ -3146,7 +3146,10 @@ class Base( CopyContainer,
# Return a copy of history time, to prevent modification
return DateTime(max_date)
if self._p_serial:
return DateTime(TimeStamp(self._p_serial).timeTime())
try:
return DateTime(TimeStamp(self._p_serial).timeTime())
except DateTime.TimeError:
return None
# Layout management
security.declareProtected(Permissions.AccessContentsInformation, 'getApplicableLayout')
......
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