portal/list: handle missing list

This commit is contained in:
Iain Learmonth 2022-08-17 13:23:42 +01:00
parent 1b93938a8e
commit e982336379

View file

@ -131,7 +131,7 @@ class NewMirrorListForm(FlaskForm): # type: ignore
@bp.route('/edit/<list_id>', methods=['GET', 'POST'])
def list_edit(list_id: int) -> ResponseReturnValue:
list_: Optional[MirrorList] = MirrorList.query.filter(MirrorList.id == list_id).first()
if list is None:
if list_ is None:
return Response(render_template("error.html.j2",
section="list",
header="404 Distribution List Not Found",