diff --git a/atlassian/bitbucket/__init__.py b/atlassian/bitbucket/__init__.py index b9f4aa291..28c0b304c 100644 --- a/atlassian/bitbucket/__init__.py +++ b/atlassian/bitbucket/__init__.py @@ -1458,7 +1458,10 @@ def disable_repo_hook_settings(self, project_key, repository_slug, hook_key): return self.delete(url) def _url_webhooks(self, project_key, repository_slug): - return "{}/webhooks".format(self._url_repo(project_key, repository_slug)) + if repository_slug is None: + return "{}/webhooks".format(self._url_project(project_key)) + else: + return "{}/webhooks".format(self._url_repo(project_key, repository_slug)) def get_webhooks( self,