Skip to content

Commit 2d0731c

Browse files
authored
Fix project access on healthcheck (#12555)
Build.version isn't always set, but we should just access build.project directly. I checked and we aren't using `build.version.project` anywhere else, so should be safe.
1 parent 3150bf8 commit 2d0731c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/api/v2/views/model_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def healthcheck(self, request, **kwargs):
314314
builder_hostname = request.GET.get("builder")
315315
structlog.contextvars.bind_contextvars(
316316
build_id=build.pk,
317-
project_slug=build.version.project.slug,
317+
project_slug=build.project.slug,
318318
builder_hostname=builder_hostname,
319319
)
320320

0 commit comments

Comments
 (0)