Commit a1fa5881 authored by Julien Muchembled's avatar Julien Muchembled

Better exception handling when comparing revisions in ERP5 UI

parent da28fae5
......@@ -52,6 +52,7 @@
<key> <string>_body</string> </key>
<value> <string>from Products.PythonScripts.standard import Object\n
from ZODB.POSException import ConflictError\n
from zExceptions import Unauthorized\n
Base_translateString = context.Base_translateString\n
\n
serial = context.REQUEST[\'serial\']\n
......@@ -59,9 +60,9 @@ next_serial = context.REQUEST[\'next_serial\']\n
\n
try:\n
context.HistoricalRevisions[serial]\n
except ConflictError:\n
except (ConflictError, Unauthorized):\n
raise\n
except: # POSKeyError\n
except Exception: # POSKeyError\n
return [Object(property_name=Base_translateString(\'Historical revisions are\'\n
\' not available, maybe the database has been packed\'))]\n
\n
......
41128
\ No newline at end of file
41129
\ No newline at end of file
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