diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-03-25 12:56:36 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-03-25 13:19:44 -0700 |
commit | ec15f162706da58c464b5c2b7b623920fcb96d7f (patch) | |
tree | 01981fe18cf79dcc2d38f3a2c94d469b48eb0249 /python/fatcat_web/templates | |
parent | 40fd4863c3c68261119aaa5b8f53d6b9dfc7a4cd (diff) | |
download | fatcat-ec15f162706da58c464b5c2b7b623920fcb96d7f.tar.gz fatcat-ec15f162706da58c464b5c2b7b623920fcb96d7f.zip |
improve citeproc/CSL web interface
This tries to show the citeproc (bibtext, MLA, CSL-JSON) options for
more releases, and not show the links when they would break.
The primary motivation here is to work around two exceptions being
thrown in prod every day (according to sentry):
KeyError: 'role'
ValueError: CLS requries some surname (family name)
I'm guessing these are mostly coming from crawlers following the
citeproc links on release landing pages.
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r-- | python/fatcat_web/templates/release_view.html | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index 961b4759..d7c4e76e 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -388,8 +388,7 @@ accessible version. <br>grouping other versions (eg, pre-print) and variants of this release </div> -{# this restriction, for CSL-JSON generation, rules out almost everything #} -{% if release.contribs and release.contribs[0].creator_id %} +{% if release._can_citeproc %} <div class="ui segment attached accordion"> <div class="title" style="padding: 0px;"> <i class="dropdown icon"></i><b>Cite This Release</b> |