]> git.lizzy.rs Git - cheatdb.git/commitdiff
Fix crash on existing GitHub App Integration v1.23.1
authorrubenwardy <rw@rubenwardy.com>
Sat, 25 Jan 2020 03:09:59 +0000 (03:09 +0000)
committerrubenwardy <rw@rubenwardy.com>
Sat, 25 Jan 2020 03:09:59 +0000 (03:09 +0000)
app/blueprints/github/__init__.py

index c65a68d4d4f695f54d2783be0c4c7c029555d7a1..0049f78fbca580c3cf4e32be371c8cb0d6bbfa92 100644 (file)
@@ -235,7 +235,8 @@ def handleMakeWebhook(gh_user, gh_repo, package, oauth, event, token):
                return False
 
        for hook in r.json():
-               if hook["config"]["url"] == data["config"]["url"]:
+               if hook.get("config") and hook["config"].get("url") and \
+                               hook["config"]["url"] == data["config"]["url"]:
                        flash("Failed to create webhook, as it already exists", "danger")
                        return False