Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Klaus Wölfel
erp5
Commits
a1fa5881
Commit
a1fa5881
authored
11 years ago
by
Julien Muchembled
Browse files
Options
Download
Email Patches
Plain Diff
Better exception handling when comparing revisions in ERP5 UI
parent
da28fae5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml
.../erp5_core/Base_getHistoricalComparisonDifferenceList.xml
+3
-2
product/ERP5/bootstrap/erp5_core/bt/revision
product/ERP5/bootstrap/erp5_core/bt/revision
+1
-1
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml
View file @
a1fa5881
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.PythonScripts.standard import Object\n
<value>
<string>
from Products.PythonScripts.standard import Object\n
from ZODB.POSException import ConflictError\n
from ZODB.POSException import ConflictError\n
from zExceptions import Unauthorized\n
Base_translateString = context.Base_translateString\n
Base_translateString = context.Base_translateString\n
\n
\n
serial = context.REQUEST[\'serial\']\n
serial = context.REQUEST[\'serial\']\n
...
@@ -59,9 +60,9 @@ next_serial = context.REQUEST[\'next_serial\']\n
...
@@ -59,9 +60,9 @@ next_serial = context.REQUEST[\'next_serial\']\n
\n
\n
try:\n
try:\n
context.HistoricalRevisions[serial]\n
context.HistoricalRevisions[serial]\n
except ConflictError:\n
except
(
ConflictError
, Unauthorized)
:\n
raise\n
raise\n
except: # POSKeyError\n
except
Exception
: # POSKeyError\n
return [Object(property_name=Base_translateString(\'Historical revisions are\'\n
return [Object(property_name=Base_translateString(\'Historical revisions are\'\n
\' not available, maybe the database has been packed\'))]\n
\' not available, maybe the database has been packed\'))]\n
\n
\n
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/bootstrap/erp5_core/bt/revision
View file @
a1fa5881
41128
41129
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment