Skip to content

Commit da1cd8a

Browse files
committed
Fix PR builds being marked built
This was removed in #7044, and it's needed to properly link to the PR builds and update their status.
1 parent f8dd0e0 commit da1cd8a

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

readthedocs/projects/tasks.py

+8-12
Original file line numberDiff line numberDiff line change
@@ -787,14 +787,13 @@ def run_build(self, record):
787787
# We upload EXTERNAL version media files to blob storage
788788
# We should have this check here to make sure
789789
# the files don't get re-uploaded on web.
790-
if self.version.type != EXTERNAL:
791-
self.update_app_instances(
792-
html=bool(outcomes['html']),
793-
search=bool(outcomes['search']),
794-
localmedia=bool(outcomes['localmedia']),
795-
pdf=bool(outcomes['pdf']),
796-
epub=bool(outcomes['epub']),
797-
)
790+
self.update_app_instances(
791+
html=bool(outcomes['html']),
792+
search=bool(outcomes['search']),
793+
localmedia=bool(outcomes['localmedia']),
794+
pdf=bool(outcomes['pdf']),
795+
epub=bool(outcomes['epub']),
796+
)
798797
else:
799798
log.warning('No build ID, not syncing files')
800799

@@ -1114,9 +1113,6 @@ def update_app_instances(
11141113
'Updating version failed, skipping file sync: version=%s',
11151114
self.version,
11161115
)
1117-
hostname = socket.gethostname()
1118-
1119-
delete_unsynced_media = True
11201116

11211117
# Broadcast finalization steps to web application instances
11221118
fileify.delay(
@@ -1272,7 +1268,7 @@ def fileify(version_pk, commit, build):
12721268
This is so we have an idea of what files we have in the database.
12731269
"""
12741270
version = Version.objects.get_object_or_log(pk=version_pk)
1275-
if not version:
1271+
if not version or version.type == EXTERNAL:
12761272
return
12771273
project = version.project
12781274

0 commit comments

Comments
 (0)