API: validating a stack's env vars no longer drops the environment id

This commit is contained in:
jarek committed 2026-08-18 10:05:37 +02:00
1 parent e9b6bf48a7
commit adabaffb23
1 file changed
+3 -1
+3 -1
View File
@@ -143,7 +143,9 @@ export const POST: RequestHandler = async ({ params, url, cookies, request }) =>
// If no compose in body, try to load from saved file
if (!composeContent) {
const savedCompose = await getStackComposeFile(stackName);
// Pass the env id so an environment-scoped stack_sources row is found - without
// it getStackSource scopes to environment_id IS NULL and the fallback misses (#1423).
const savedCompose = await getStackComposeFile(stackName, envIdNum);
if (savedCompose.success && savedCompose.content) {
composeContent = savedCompose.content;
}