handle case where alias is None
This commit is contained in:
parent
edfd3c0719
commit
45a8b360e4
|
@ -324,6 +324,9 @@ def get_alias(alias_id):
|
|||
user = g.user
|
||||
alias: Alias = Alias.get(alias_id)
|
||||
|
||||
if not alias:
|
||||
return jsonify(error="Unknown error"), 400
|
||||
|
||||
if alias.user_id != user.id:
|
||||
return jsonify(error="Forbidden"), 403
|
||||
|
||||
|
|
Loading…
Reference in a new issue