• Jérome Perrin's avatar
    core: fix error when downloading when mimetypes_registry only defines globs · 5ea313bb
    Jérome Perrin authored
    DownloadableMixin uses mimetypes_registry to guess an extension from
    the mimetype, but this was wrong when the entry in mimetype only defines
    globs, an error like this was raised:
    
          Module erp5.component.mixin.erp5_version.DownloadableMixin, line 143, in index_html
            output_format = mimetype_object.globs.strip('*.')
        AttributeError: 'list' object has no attribute 'strip'
    
    Also blindly apply the same fix in OOoTemplate, as it used the same
    problematic pattern.
    5ea313bb
test.erp5.testDms.py 140 KB