Skip to content

Commit

Permalink
frontend: log missing copr chroot in get_build_record
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed Aug 11, 2023
1 parent 9941808 commit 4ee4d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/coprs_frontend/coprs/logic/complex_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ def get_copr_chroot_safe(copr, chroot_name):

if not chroot:
raise ObjectNotFound(
message="Chroot name {} does not exist.".format(chroot_name))
message="Chroot name {0} does not exist in Copr {1}."
.format(chroot_name, copr.full_name)
)

return chroot

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def get_build_record(task, for_backend=False):
"repo_priority": task.build.copr.repo_priority
})

copr_chroot = CoprChrootsLogic.get_by_name_safe(task.build.copr, task.mock_chroot.name)
copr_chroot = CoprChrootsLogic.get_copr_chroot_safe(task.build.copr, task.mock_chroot.name)
modules = copr_chroot.module_setup_commands
if modules:
build_record["modules"] = {'toggle': modules}
Expand Down

0 comments on commit 4ee4d9d

Please sign in to comment.