Skip to content

Commit cff750a

Browse files
committed
Cleanup prod urls
1 parent 7383ada commit cff750a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

readthedocs/builds/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ def get_absolute_url(self):
277277
# TODO: We can integrate them into the resolver
278278
# but this is much simpler to handle since we only link them a couple places for now
279279
if self.type == EXTERNAL:
280-
return f"{settings.EXTERNAL_VERSION_URL}/html/{self.project.slug}/{self.slug}/index.html"
280+
url = f"{settings.EXTERNAL_VERSION_URL}/html/{self.project.slug}/{self.slug}/"
281+
if settings.DEBUG:
282+
url += 'index.html'
283+
return url
281284
if not self.built and not self.uploaded:
282285
return reverse(
283286
'project_version_detail',

0 commit comments

Comments
 (0)