Commit 5e0f6818 authored by Yoshinori Okuji's avatar Yoshinori Okuji

if uid is not an integer, do not ask a relational database in getPathForUid,...

if uid is not an integer, do not ask a relational database in getPathForUid, because it is meaningless.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4813 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 100a844a
......@@ -1219,6 +1219,10 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
try:
if uid is None:
return None
try:
int(uid)
except ValueError:
return None
# Get the appropriate SQL Method
method = getattr(self, self.sql_getitem_by_uid)
search_result = method(uid = uid)
......
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