summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-17 10:44:38 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-17 10:44:38 -0800
commit24e7a7038f9f0c827a11282a5cc646117ffdfb9b (patch)
tree40227dbd1a2b652bad24c9d71f8027c20ef1b7d1 /python/fatcat_web
parent3ad702e413c084590505cff16f9532b236718049 (diff)
parent0a8c9a5e07213276617f06b0379a166e7fd1c100 (diff)
downloadfatcat-24e7a7038f9f0c827a11282a5cc646117ffdfb9b.tar.gz
fatcat-24e7a7038f9f0c827a11282a5cc646117ffdfb9b.zip
Merge branch 'citation-efficiency'
Manually merged conflict in: - ./TODO
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/auth.py5
-rw-r--r--python/fatcat_web/templates/release_view.html2
2 files changed, 5 insertions, 2 deletions
diff --git a/python/fatcat_web/auth.py b/python/fatcat_web/auth.py
index 8035cbe5..03964c92 100644
--- a/python/fatcat_web/auth.py
+++ b/python/fatcat_web/auth.py
@@ -90,7 +90,10 @@ def handle_ia_xauth(email, password):
'secret': Config.IA_XAUTH_CLIENT_SECRET,
})
if resp.status_code == 401 or (not resp.json().get('success')):
- flash("Internet Archive email/password didn't match: {}".format(resp.json()['values']['reason']))
+ try:
+ flash("Internet Archive email/password didn't match: {}".format(resp.json()['values']['reason']))
+ except:
+ print("IA XAuth fail: {}".format(resp.content))
return render_template('auth_ia_login.html', email=email), resp.status_code
elif resp.status_code != 200:
flash("Internet Archive login failed (internal error?)")
diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html
index fd86b7c9..4e24b281 100644
--- a/python/fatcat_web/templates/release_view.html
+++ b/python/fatcat_web/templates/release_view.html
@@ -143,7 +143,7 @@ Raw Object:
{% endif %}
<br>
-{% if release.refs.size != 0 %}
+{% if release.refs != None and release.refs.size != 0 %}
<h3>References</h3>
This release citing other releases.
<ol>