diff --git a/attract/routes.py b/attract/routes.py index bd1b7f8..0cafded 100644 --- a/attract/routes.py +++ b/attract/routes.py @@ -3,6 +3,7 @@ import logging from flask import Blueprint, render_template, redirect, url_for import flask_login +import werkzeug.exceptions as wz_exceptions from pillar.web.utils import attach_project_pictures import pillar.web.subquery @@ -55,7 +56,7 @@ def index(): act.project = id_to_proj[act.project] try: act.link = current_attract.link_for_activity(act) - except ValueError: + except (ValueError, wz_exceptions.NotFound): act.link = None return render_template('attract/index.html',