[FIX] ir_qweb: useless test in js bundle generation
If one of the javascript files of the bundle has been modified since the bundle generation, we are sure that get_attachments will return an empty list because it searches with the version of the bundle which takes into account the last modification of any of the bundle's content. Also, this check is not present in the css bundle generation.
This commit is contained in:
@@ -1249,7 +1249,7 @@ class AssetsBundle(object):
|
||||
|
||||
def js(self):
|
||||
attachments = self.get_attachments('js')
|
||||
if not attachments or attachments[0]['__last_update'] < Datetime.to_string(max([asset.last_modified for asset in self.javascripts])):
|
||||
if not attachments:
|
||||
content = ';\n'.join(asset.minify() for asset in self.javascripts)
|
||||
return self.save_attachment('js', content)
|
||||
return attachments[0]
|
||||
|
||||
Reference in New Issue
Block a user