summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r--python/fatcat_web/routes.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index acc4b3e2..1eeab279 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -207,8 +207,15 @@ def file_view(ident):
abort(ae.status)
if entity.state == "redirect":
return redirect('/file/{}'.format(entity.redirect))
- if entity.state == "deleted":
+ elif entity.state == "deleted":
return render_template('deleted_entity.html', entity=entity)
+ else:
+ try:
+ entity.releases = []
+ for r in entity.release_ids:
+ entity.releases.append(api.get_release(r))
+ except ApiException as ae:
+ abort(ae.status)
return render_template('file_view.html', file=entity)
@app.route('/release/lookup', methods=['GET'])