Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions readthedocs/projects/views/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ def trigger_initial_build(self, project, user):
from readthedocs.oauth.tasks import attach_webhook

task_promise = chain(
# TODO: Remove user_pk on the next release,
# it's used just to keep backward compatibility with the old task signature.
attach_webhook.si(project.pk, user.pk),
attach_webhook.si(project.pk),
update_docs,
)
async_result = task_promise.apply_async()
Expand Down
10 changes: 1 addition & 9 deletions readthedocs/projects/views/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,9 +945,6 @@ def form_valid(self, form):
attach_webhook(
project_pk=self.get_project().pk,
integration=self.object,
# TODO: Remove user_pk on the next release,
# it's used just to keep backward compatibility with the old task signature.
user_pk=None,
)
return HttpResponseRedirect(self.get_success_url())

Expand Down Expand Up @@ -1016,12 +1013,7 @@ def post(self, request, *args, **kwargs):
# This is a brute force form of the webhook sync, if a project has a
# webhook or a remote repository object, the user should be using
# the per-integration sync instead.
attach_webhook(
project_pk=self.get_project().pk,
# TODO: Remove user_pk on the next release,
# it's used just to keep backward compatibility with the old task signature.
user_pk=None,
)
attach_webhook(project_pk=self.get_project().pk)
return HttpResponseRedirect(self.get_success_url())

def get_success_url(self):
Expand Down
1 change: 0 additions & 1 deletion readthedocs/rtd_tests/tests/test_project_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ def test_integration_create(self, attach_webhook):
attach_webhook.assert_called_once_with(
project_pk=self.project.pk,
integration=integration.first(),
user_pk=None,
)

@mock.patch("readthedocs.projects.views.private.attach_webhook")
Expand Down