diff --git a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py index 8a7b4c34a..0fde0791e 100755 --- a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py +++ b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py @@ -172,6 +172,11 @@ def get_build_record(task, for_backend=False): }) copr_chroot = CoprChrootsLogic.get_by_name_safe(task.build.copr, task.mock_chroot.name) + if not copr_chroot: + app.logger.error("The %s chroot is disabled (build %s)", + task.mock_chroot.name, task.build.id) + return None + modules = copr_chroot.module_setup_commands if modules: build_record["modules"] = {'toggle': modules}