mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
handle case highlight_id is not int
This commit is contained in:
parent
a37f7fe8b8
commit
5480f6d35b
@ -2,6 +2,7 @@ from flask import render_template, request
|
|||||||
from flask_login import login_required, current_user
|
from flask_login import login_required, current_user
|
||||||
|
|
||||||
from app.dashboard.base import dashboard_bp
|
from app.dashboard.base import dashboard_bp
|
||||||
|
from app.log import LOG
|
||||||
from app.models import EmailLog
|
from app.models import EmailLog
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +12,11 @@ def refused_email_route():
|
|||||||
# Highlight a refused email
|
# Highlight a refused email
|
||||||
highlight_id = request.args.get("highlight_id")
|
highlight_id = request.args.get("highlight_id")
|
||||||
if highlight_id:
|
if highlight_id:
|
||||||
|
try:
|
||||||
highlight_id = int(highlight_id)
|
highlight_id = int(highlight_id)
|
||||||
|
except ValueError:
|
||||||
|
LOG.warning("Cannot parse highlight_id %s", highlight_id)
|
||||||
|
highlight_id = None
|
||||||
|
|
||||||
email_logs: [EmailLog] = (
|
email_logs: [EmailLog] = (
|
||||||
EmailLog.query.filter(
|
EmailLog.query.filter(
|
||||||
|
Loading…
Reference in New Issue
Block a user