mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 00:03:03 +08:00
handle case highlight_id is not int
This commit is contained in:
parent
a37f7fe8b8
commit
5480f6d35b
1 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,7 @@ from flask import render_template, request
|
|||
from flask_login import login_required, current_user
|
||||
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.log import LOG
|
||||
from app.models import EmailLog
|
||||
|
||||
|
||||
|
@ -11,7 +12,11 @@ def refused_email_route():
|
|||
# Highlight a refused email
|
||||
highlight_id = request.args.get("highlight_id")
|
||||
if highlight_id:
|
||||
try:
|
||||
highlight_id = int(highlight_id)
|
||||
except ValueError:
|
||||
LOG.warning("Cannot parse highlight_id %s", highlight_id)
|
||||
highlight_id = None
|
||||
|
||||
email_logs: [EmailLog] = (
|
||||
EmailLog.query.filter(
|
||||
|
|
Loading…
Reference in a new issue