From 83e98be8622c7bee3bb4504c8c2078b486cc7b52 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Thu, 6 Nov 2025 08:52:09 -0500 Subject: [PATCH] Fix self.data.project not existing Fixes https://read-the-docs.sentry.io/issues/4309953823/?project=161479 --- readthedocs/projects/tasks/builds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/projects/tasks/builds.py b/readthedocs/projects/tasks/builds.py index 0735f018c6e..5dc70fc5f81 100644 --- a/readthedocs/projects/tasks/builds.py +++ b/readthedocs/projects/tasks/builds.py @@ -782,7 +782,7 @@ def after_return(self, status, retval, task_id, args, kwargs, einfo): log.exception("Failed to revoke build api key.", exc_info=True) # Disable scale-in protection on this instance - if self.data.project.has_feature(Feature.SCALE_IN_PROTECTION): + if self.data.project and self.data.project.has_feature(Feature.SCALE_IN_PROTECTION): set_builder_scale_in_protection.delay( build_id=self.data.build_pk, builder=socket.gethostname(),