We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aab3204 commit bb577efCopy full SHA for bb577ef
apps/webapp/app/presenters/v3/BatchListPresenter.server.ts
@@ -81,7 +81,12 @@ export class BatchListPresenter extends BasePresenter {
81
82
let environmentIds = project.environments.map((e) => e.id);
83
if (environments && environments.length > 0) {
84
- environmentIds = environments;
+ //if environments are passed in, we only include them if they're in the project
85
+ environmentIds = environments.filter((e) => project.environments.some((pe) => pe.id === e));
86
+ }
87
+
88
+ if (environmentIds.length === 0) {
89
+ throw new Error("No matching environments found for the project");
90
}
91
92
const periodMs = period ? parse(period) : undefined;
0 commit comments