mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 08:13:16 +08:00
Handle alias can be None when deleting
This commit is contained in:
parent
51676f02b5
commit
af431c3d8b
1 changed files with 5 additions and 0 deletions
|
@ -95,6 +95,11 @@ def index():
|
|||
elif request.form.get("form-name") == "delete-email":
|
||||
alias_id = request.form.get("alias-id")
|
||||
alias: Alias = Alias.get(alias_id)
|
||||
if not alias:
|
||||
flash("Unknown error, sorry for the inconvenience", "error")
|
||||
return redirect(
|
||||
url_for("dashboard.index", highlight_alias_id=alias.id, query=query)
|
||||
)
|
||||
|
||||
LOG.d("delete gen email %s", alias)
|
||||
email = alias.email
|
||||
|
|
Loading…
Reference in a new issue