Fix crash in GitLab webhook

This commit is contained in:
rubenwardy
2020-12-03 20:33:57 +00:00
parent 6eb4a803fd
commit 00be054135

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):