Raise DAV_NotFound if exception occurs when retreiving datas for issue98
This commit is contained in:
1 parent
86a713e9f7
commit
28320a7bde
1 file changed
+5
-2
@@ -249,8 +249,11 @@ class Collection(OSV):
|
||||
attachment_obj = self.pool.get('ir.attachment')
|
||||
attachment = attachment_obj.browse(cursor, user, object_id,
|
||||
context=context)
|
||||
if attachment.datas:
|
||||
return base64.decodestring(attachment.datas)
|
||||
try:
|
||||
if attachment.datas:
|
||||
return base64.decodestring(attachment.datas)
|
||||
except:
|
||||
raise DAV_NotFound
|
||||
if object_name == 'ir.action.report' and object_id:
|
||||
report_obj = self.pool.get('ir.action.report')
|
||||
report_id = int(uri.rsplit('/', 1)[-1].rsplit('-',
|
||||
|
||||
Reference in new issue
Block a user