[FIX] ir_attachment: wrong assert in invalidate_bundle method

If the css file was splitted into several css.0,... files,
the assert was crashing.
Introduced by commit 37959d4
This commit is contained in:
Yannick Tivisse
2015-09-03 17:24:20 +02:00
parent f962b0f628
commit aa8f063c07
+1 -1
View File
@@ -471,7 +471,7 @@ class ir_attachment(osv.osv):
cr, uid, 'base', 'action_attachment', context=context)
def invalidate_bundle(self, cr, uid, type='%', xmlid=None, context=None):
assert type in ('%', 'css', 'js'), "Unhandled bundle type"
assert type in ('%', 'js') or type.startswith('css'), "Unhandled bundle type"
xmlid = '%' if xmlid is None else xmlid + '%'
domain = [('url', '=like', '/web/%s/%s/%%' % (type, xmlid))]
ids = self.search(cr, uid, domain, context=context)