diff --git a/service/dynamicSectionService.js b/service/dynamicSectionService.js index 2b93773..72fcd64 100644 --- a/service/dynamicSectionService.js +++ b/service/dynamicSectionService.js @@ -138,6 +138,7 @@ var getSectionsByParentId = async function (parentId) { const editSetion = async (sectionId, section) => { try { + section.questions.forEach(question => question._id = new ObjectId(question._id)) const result = await SectionDAO.editSection(sectionId, section); if (result.modifiedCount === 1) { const sectionFromDB = await SectionDAO.getSectionById(sectionId);