Commit 16869f9a authored by Jérome Perrin's avatar Jérome Perrin

core: fix error when downloading when mimetypes_registry only defines globs

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.
parent 263873cf
Pipeline #31927 failed with stage
in 0 seconds