Skip to content
Snippets Groups Projects
Commit b1838172 authored by Christophe Matthieu's avatar Christophe Matthieu
Browse files

[FIX] website: infinite loop in website add page method

parent 087fd694
No related branches found
No related tags found
No related merge requests found
......@@ -200,8 +200,8 @@ class website(osv.osv):
# find a free xmlid
inc = 0
dom = [('key', '=', page_xmlid), '|', ('website_id', '=', False), ('website_id', '=', context.get('website_id'))]
while view.search(cr, openerp.SUPERUSER_ID, dom, context=dict(context or {}, active_test=False)):
dom = [('website_id', '=', False), ('website_id', '=', context.get('website_id'))]
while view.search(cr, openerp.SUPERUSER_ID, [('key', '=', page_xmlid), '|'] + dom, context=dict(context or {}, active_test=False)):
inc += 1
page_xmlid = "%s.%s" % (template_module, page_name + (inc and "-%s" % inc or ""))
page_name += (inc and "-%s" % inc or "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment