Raise exception in report_content is empty
This commit is contained in:
1 parent
c0d5db44c1
commit
96d1e27149
1 file changed
+2
@@ -228,6 +228,8 @@ class Report(object):
|
||||
browse(cursor, user, user)
|
||||
localcontext['_language_cache'] = {}
|
||||
localcontext.update(context)
|
||||
if not report.report_content:
|
||||
raise ExceptOSV('Error', 'Missing report file!')
|
||||
content_io = StringIO.StringIO(report.report_content)
|
||||
content_z = zipfile.ZipFile(content_io, mode='r')
|
||||
content_xml = content_z.read('content.xml')
|
||||
|
||||
Reference in new issue
Block a user