fix alias can be none in delete alias endpoint
This commit is contained in:
parent
02bd45bc4a
commit
204f5f9a0c
|
@ -131,7 +131,7 @@ def delete_alias(alias_id):
|
|||
user = g.user
|
||||
alias = Alias.get(alias_id)
|
||||
|
||||
if alias.user_id != user.id:
|
||||
if not alias or alias.user_id != user.id:
|
||||
return jsonify(error="Forbidden"), 403
|
||||
|
||||
alias_utils.delete_alias(alias, user)
|
||||
|
|
Loading…
Reference in a new issue