[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:
parent
c771903c3b
commit
8bf8e8a01c
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue