From 39fc53dd8de38f5b6a666e6eb9e0b9a0e210946c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 Jan 2021 22:25:21 -0800 Subject: doi domain display: handle /help page --- fatcat_scholar/templates/search_macros.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'fatcat_scholar/templates/search_macros.html') diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 25ba7f5..2f8ddc7 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -108,7 +108,12 @@ {% else %} {% endif %} - {{ paper._obj.biblio.doi_link_domain("Publisher / doi.org") }} + {% set default_domain = "Publisher / doi.org" %} + {% if paper._obj and paper._obj.biblio %} + {{ paper._obj.biblio.doi_link_domain(default_domain) }} + {% else %} + {{ default_domain }} + {% endif %} {% endif %} -- cgit v1.2.3