Fix crash in GitLab webhook

This commit is contained in:
rubenwardy 2020-12-03 20:33:57 +00:00
parent 6eb4a803fd
commit 00be054135
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ def webhook():
return error(403, "Token required")
token = APIToken.query.filter_by(access_token=secret).first()
if secret is None:
if token is None:
return error(403, "Invalid authentication")
if not package.checkPerm(token.owner, Permission.APPROVE_RELEASE):