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.
Showing
Please register or sign in to comment