261022_04_ENH: 메인 차트 R팀 조회 범위 제한 및 O/N 문항 하위 row 없는 등록 허용
This commit is contained in:
@@ -86,6 +86,17 @@ public class QuestionImportService {
|
||||
labels.set(Integer.toString(labels.size() + 1), label);
|
||||
}
|
||||
}
|
||||
// User decision: O/N without input rows (none, attribute-only or blank titles) get one
|
||||
// input with an empty label instead of failing.
|
||||
if (itemType.equals("open") && labels.isEmpty()) {
|
||||
labels.set(
|
||||
"1",
|
||||
objectMapper
|
||||
.createObjectNode()
|
||||
.put("label", "")
|
||||
.put("option", type.equals("n") ? "num" : "all")
|
||||
.put("must", "1"));
|
||||
}
|
||||
ObjectNode dataset = objectMapper.createObjectNode();
|
||||
if (!labels.isEmpty()) {
|
||||
dataset.set(itemType, labels);
|
||||
|
||||
Reference in New Issue
Block a user