[FIX] website ir_qweb: do not crash if request is not bound when rendering a template

bzr revid: sle@openerp.com-20140402161349-ecm6pit20j44taf1
This commit is contained in:
Simon Lejeune 2014-04-02 18:13:49 +02:00
parent c771903c3b
commit 8bf8e8a01c
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class view(osv.osv):
return arch
def render(self, cr, uid, id_or_xml_id, values=None, engine='ir.qweb', context=None):
if getattr(request, 'website_enabled', False):
if request and getattr(request, 'website_enabled', False):
engine='website.qweb'
if isinstance(id_or_xml_id, list):