Browse Source

handle case where highlight_alias_id is not a number

Son NK 4 years ago
parent
commit
b09bb42b2d
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/dashboard/views/index.py

+ 7 - 1
app/dashboard/views/index.py

@@ -57,7 +57,13 @@ def index():
 
     highlight_alias_id = None
     if request.args.get("highlight_alias_id"):
-        highlight_alias_id = int(request.args.get("highlight_alias_id"))
+        try:
+            highlight_alias_id = int(request.args.get("highlight_alias_id"))
+        except ValueError:
+            LOG.warning(
+                "highlight_alias_id must be a number, received %s",
+                request.args.get("highlight_alias_id"),
+            )
 
     # User generates a new email
     if request.method == "POST":