fix alias can be none in update alias endpoint
This commit is contained in:
parent
0e3aa42326
commit
02bd45bc4a
|
@ -240,7 +240,7 @@ def update_alias(alias_id):
|
|||
user = g.user
|
||||
alias: 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
|
||||
|
||||
changed = False
|
||||
|
|
Loading…
Reference in a new issue