From 0ce9516f34348e13de64137b389ead25264ca1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9becca=20Tinchon?= Date: Tue, 19 Dec 2023 12:18:10 +0100 Subject: [PATCH] Fixes of copy chapter action --- .../lesson/Resources/modules/resources/lesson/store/actions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugin/lesson/Resources/modules/resources/lesson/store/actions.js b/src/plugin/lesson/Resources/modules/resources/lesson/store/actions.js index c50f0f17b61..0b11464dfd3 100644 --- a/src/plugin/lesson/Resources/modules/resources/lesson/store/actions.js +++ b/src/plugin/lesson/Resources/modules/resources/lesson/store/actions.js @@ -77,9 +77,10 @@ actions.copyChapter = (formName, lessonId, chapterSlug) => dispatch => { dispatch({[API_REQUEST]: { url: ['apiv2_lesson_chapter_get', {lessonId: lessonId, slug: chapterSlug}], success: (response, dispatch) => { - dispatch(formActions.resetForm(formName, response, true)) const data = cloneDeep(response) data.parentSlug = '' + data.id = undefined + dispatch(formActions.resetForm(formName, data, true)) dispatch(actions.chapterLoad(data)) } }})