[FIX] urlparse.parse_qs returns a dict *of lists*, eq test on values with a string is always false

bzr revid: xmo@openerp.com-20131121121235-hafy7n61h3v6kb0k
This commit is contained in:
Xavier Morel 2013-11-21 13:12:35 +01:00
parent fee8cb0fff
commit 82b40bf84c
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ class Image(orm.AbstractModel):
url = element.find('img').get('src')
url_object = urlparse.urlsplit(url)
query = urlparse.parse_qs(url_object.query)
query = dict(urlparse.parse_qsl(url_object.query))
if url_object.path == '/website/image' and query['model'] == 'ir.attachment':
attachment = self.pool['ir.attachment'].browse(
cr, uid, int(query['id']), context=context)