Skip to content

Commit

Permalink
Prevent mandatory jobs from being added to the rejected jobs
Browse files Browse the repository at this point in the history
When user de-selects jobs in the UI, they may de-select mandatory jobs.
These jobs, even if de-selected, will still be added to the list of jobs
to run later on, and will be executed.

Therefore, they should not be part of the rejected jobs list.
  • Loading branch information
pieqq committed Nov 15, 2024
1 parent b965681 commit 7087c12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checkbox-ng/plainbox/impl/session/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ def use_alternate_selection(self, selection: "Iterable[str]"):
for job_id in self.get_static_todo_list():
if job_id in selection:
desired_job_list.append(self._context.get_unit(job_id, "job"))
else:
elif job_id not in self.get_mandatory_jobs():
self._metadata.rejected_jobs.append(job_id)
self._context.state.update_desired_job_list(desired_job_list)

Expand Down

0 comments on commit 7087c12

Please sign in to comment.