aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/transforms
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-15 10:43:27 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-15 10:43:27 -0700
commita4bc37289a74df90d6b095e8a3e1958e8be3147f (patch)
tree179a05997a070412c5b0b0ca9f8f1012e042556f /python/fatcat_tools/transforms
parent4d56e71598457489e9f71ef4ce5c9b0254a4cce1 (diff)
downloadfatcat-a4bc37289a74df90d6b095e8a3e1958e8be3147f.tar.gz
fatcat-a4bc37289a74df90d6b095e8a3e1958e8be3147f.zip
elastic transforms: work around missing pdf mimetypes
Diffstat (limited to 'python/fatcat_tools/transforms')
-rw-r--r--python/fatcat_tools/transforms/elasticsearch.py2
1 files changed, 1 insertions, 1 deletions
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