fix: 问卷设计,复制问题偶现问题丢失

This commit is contained in:
钱冠学
2024-09-30 16:41:03 +08:00
parent 384889b454
commit 41e10f56ca

View File

@@ -425,7 +425,12 @@ export default {
* 复制题目
*/
const copyHandle = (copyInfo) => {
context.emit("update", copyInfo);
// 2024-09-30 remove this line.
// this line (1st api call) and the end line of this method (2nd api call) will trigger api call twice (same api with different params)
// and the sequence of those two api call is very important
// sometimes (not very often) 1st api call would be after 2nd api call [[[the ERROR show up here]]]
// backend will add and delete new copied question immediately
// context.emit("update", copyInfo);
let copyInfoCopy = JSON.parse(JSON.stringify(copyInfo));
if ([105, 201].includes(copyInfoCopy.question_type)) {
copyInfoCopy.config.design_version = 0;