From a4bc37289a74df90d6b095e8a3e1958e8be3147f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 15 May 2019 10:43:27 -0700 Subject: elastic transforms: work around missing pdf mimetypes --- python/fatcat_tools/transforms/elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py index 971d1c11..91086a0c 100644 --- a/python/fatcat_tools/transforms/elasticsearch.py +++ b/python/fatcat_tools/transforms/elasticsearch.py @@ -137,7 +137,7 @@ def release_to_elasticsearch(entity, force_bool=True): if f.extra and f.extra.get('shadows'): # TODO: shadow check goes here in_shadows = True - is_pdf = 'pdf' in (f.mimetype or '') + is_pdf = 'pdf' in (f.mimetype or '') or 'pdf' in url.lower() for url in (f.urls or []): if url.url.lower().startswith('http'): in_web = True -- cgit v1.2.3