From b17d920bc7cf0914bbfaca4ed00269c6d36dd644 Mon Sep 17 00:00:00 2001 From: jlaamanen Date: Wed, 13 Nov 2024 17:36:11 +0200 Subject: [PATCH] Fixed a problem with updating follow-up questions --- server/src/application/survey.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/application/survey.ts b/server/src/application/survey.ts index 6122c314..38c226ef 100644 --- a/server/src/application/survey.ts +++ b/server/src/application/survey.ts @@ -997,7 +997,7 @@ async function deleteRemovedSections( ) { // Get all existing sections const rows = await getDb().manyOrNone<{ id: number }>( - `SELECT id FROM data.page_section WHERE parent_section IS NULL AND survey_page_id IN ( + `SELECT id FROM data.page_section WHERE parent_section IS NULL AND predecessor_section IS NULL AND survey_page_id IN ( SELECT id FROM data.survey_page WHERE survey_id = $1 )`, [surveyId],