From 96d1e27149ed24ea384ac729982d005fa992fa0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 19 May 2008 10:57:32 +0200 Subject: [PATCH] Raise exception in report_content is empty --- trytond/report/report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trytond/report/report.py b/trytond/report/report.py index 8d379c0696..22f0238040 100644 --- a/trytond/report/report.py +++ b/trytond/report/report.py @@ -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')