aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/templates
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-06 10:24:21 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-06 10:24:23 -0700
commit6c7814147bcb7f735abe3a33c34151a5374bc6b9 (patch)
treea500123fafea95e210db9873eded8c9bce59b7c2 /fatcat_scholar/templates
parent2f0874c84e71a02a10e21b03688593a4aa5ef426 (diff)
downloadfatcat-scholar-6c7814147bcb7f735abe3a33c34151a5374bc6b9.tar.gz
fatcat-scholar-6c7814147bcb7f735abe3a33c34151a5374bc6b9.zip
fix display of papers missing fulltext
I think the bug happened now that we do not serialize the pydantic structures with empty values. A better solution might be to deserialize search hits into pydantic objects before rendering.
Diffstat (limited to 'fatcat_scholar/templates')
-rw-r--r--fatcat_scholar/templates/search_macros.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index 0c366c9..d90af73 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -166,7 +166,7 @@
</div>
<div class="three wide left aligned column" style="padding-top: 0.5em; padding-right: 0.5em;">
- {% if paper.fulltext.access_url %}
+ {% if paper.fulltext and fulltext.access_url %}
{% if paper.fulltext.thumbnail_url %}
<div class="ui serp card" style="margin-bottom: 0.2em;">
<a class="image" target="_blank" href="{{ paper.fulltext.access_url}}">