Skip to content

Commit c4903e7

Browse files
fix labeling bug
1 parent a4cc1b6 commit c4903e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/projects/projectId/labeling/sessionId/sub-components/LabelingSuiteLabeling.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export default function LabelingSuiteLabeling() {
170170
attribute: null,
171171
};
172172
for (const task of labelingTasks) {
173-
const attributeKey = task.attribute ? task.attribute.id : FULL_RECORD_ID;
173+
const attributeKey = task.targetId || FULL_RECORD_ID;
174174
const taskCopy = { ...task };
175175
taskCopy.displayLabels = task.labels.slice(0, settings.labeling.showNLabelButton);
176176
lVarsCopy.taskLookup[attributeKey].lookup.push({
@@ -427,7 +427,7 @@ export default function LabelingSuiteLabeling() {
427427
if (task.taskType == LabelingTaskTaskType.MULTICLASS_CLASSIFICATION) {
428428
addLabelToTask(task.id, labelId);
429429
} else {
430-
addLabelToSelection(task.attribute.id, task.id, labelId);
430+
addLabelToSelection(task.targetId, task.id, labelId);
431431
}
432432
if (settings.labeling.closeLabelBoxAfterLabel) {
433433
setActiveTasksFuncRef.current([]);

0 commit comments

Comments
 (0)