diff --git a/readthedocs/builds/tasks.py b/readthedocs/builds/tasks.py index 2a736f1a8c5..5270518597d 100644 --- a/readthedocs/builds/tasks.py +++ b/readthedocs/builds/tasks.py @@ -115,7 +115,13 @@ def route_for_task(self, task, args, kwargs, **__): last_builds = version.builds.order_by('-date')[:self.N_LAST_BUILDS] # Version has used conda in previous builds for build in last_builds.iterator(): - build_tools_python = build.config.get('build', {}).get('tools', {}).get('python', {}).get('version', '') + build_tools_python = ( + build.config + .get('build', {}) + .get('tools', {}) + .get('python', {}) + .get('version', '') + ) conda = build.config.get('conda', None) uses_conda = any([