Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update external version check for notification task #5969

Merged
merged 1 commit into from
Jul 22, 2019
Merged
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
6 changes: 3 additions & 3 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,8 @@ def build_docs_class(self, builder_class):

def send_notifications(self, version_pk, build_pk):
"""Send notifications on build failure."""
send_notifications.delay(version_pk, build_pk=build_pk)
if self.version.type != EXTERNAL:
send_notifications.delay(version_pk, build_pk=build_pk)

def is_type_sphinx(self):
"""Is documentation type Sphinx."""
Expand Down Expand Up @@ -1557,8 +1558,7 @@ def _sync_imported_files(version, build, changed_files):
def send_notifications(version_pk, build_pk):
version = Version.objects.get_object_or_log(pk=version_pk)

# only send notification for Internal versions
if not version or version.type == EXTERNAL:
if not version:
return

build = Build.objects.get(pk=build_pk)
Expand Down