summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/entity_helpers.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-06-04 14:05:56 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-06-04 14:12:30 -0700
commit2f233a3b8c00385d4b215361a0fa09f93a05f8d9 (patch)
tree7c3226a9a961c1c4a7af00dbc0f47c11a3172ac2 /python/fatcat_web/entity_helpers.py
parenta42d5f0d00e76bf8474647fae4e1d9d61693a7d9 (diff)
downloadfatcat-2f233a3b8c00385d4b215361a0fa09f93a05f8d9.tar.gz
fatcat-2f233a3b8c00385d4b215361a0fa09f93a05f8d9.zip
use ES 'best_url' in file download pages
Similar to recent change for release download pages.
Diffstat (limited to 'python/fatcat_web/entity_helpers.py')
-rw-r--r--python/fatcat_web/entity_helpers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py
index d82ea0e9..e3d538e0 100644
--- a/python/fatcat_web/entity_helpers.py
+++ b/python/fatcat_web/entity_helpers.py
@@ -30,6 +30,8 @@ def enrich_creator_entity(entity):
return entity
def enrich_file_entity(entity):
+ if entity.state == "active":
+ entity._es = file_to_elasticsearch(entity)
return entity
def enrich_fileset_entity(entity):