summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/entity_helpers.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-07-24 12:43:25 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-07-30 18:28:03 -0700
commit86c150edadad347df31393742c2de091ff21da83 (patch)
treebc70b17412d0f0a887f6fd5b63a9ded7af35e6b3 /python/fatcat_web/entity_helpers.py
parent216a062f48445f3d90e59485089211ca423affe8 (diff)
downloadfatcat-86c150edadad347df31393742c2de091ff21da83.tar.gz
fatcat-86c150edadad347df31393742c2de091ff21da83.zip
move container _stats enrichment to routes
These were being added to many views which didn't need them (eg, metadata, editing views)
Diffstat (limited to 'python/fatcat_web/entity_helpers.py')
-rw-r--r--python/fatcat_web/entity_helpers.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py
index 695ac426..c9a57290 100644
--- a/python/fatcat_web/entity_helpers.py
+++ b/python/fatcat_web/entity_helpers.py
@@ -2,8 +2,7 @@
from flask import abort
from fatcat_openapi_client.rest import ApiException, ApiValueError
from fatcat_tools.transforms import *
-from fatcat_web import app, api
-from fatcat_web.search import get_elastic_container_stats
+from fatcat_web import api
from fatcat_web.hacks import strip_extlink_xml, wayback_suffix
def enrich_container_entity(entity):
@@ -11,12 +10,6 @@ def enrich_container_entity(entity):
return entity
if entity.state == "active":
entity._es = container_to_elasticsearch(entity, force_bool=False)
- entity._stats = None
- try:
- entity._stats = get_elastic_container_stats(entity.ident, issnl=entity.issnl)
- except ValueError as e:
- app.log.error(e)
- pass
return entity
def enrich_creator_entity(entity):