Commit 51dc446d authored by Jérome Perrin's avatar Jérome Perrin

casting to int can raise both TypeError or ValueError depending on the type of

the provided value, so it's better to catch both for consistency.
Thx Kazuhiko !


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18829 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6fac88fe
...@@ -2447,7 +2447,7 @@ class Base( CopyContainer, ...@@ -2447,7 +2447,7 @@ class Base( CopyContainer,
def getIntId(self): def getIntId(self):
try: try:
return int(self.getId()) return int(self.getId())
except ValueError: except (ValueError, TypeError):
return None return None
# Default views - the default security in CMFCore # Default views - the default security in CMFCore
......
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