Add points for new tasks
This commit is contained in:
parent
ea4f0c49ff
commit
0d8575d5a7
1 changed files with 2 additions and 3 deletions
|
@ -197,6 +197,7 @@
|
||||||
requires: [],
|
requires: [],
|
||||||
position: [0, 0],
|
position: [0, 0],
|
||||||
title: t.name,
|
title: t.name,
|
||||||
|
points: t.points!
|
||||||
}));
|
}));
|
||||||
tasks.tasks = [...tasks.tasks, ...newDescriptors];
|
tasks.tasks = [...tasks.tasks, ...newDescriptors];
|
||||||
}
|
}
|
||||||
|
@ -207,9 +208,7 @@
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
const a = await grabAssignment(t.taskReference)
|
const a = await grabAssignment(t.taskReference)
|
||||||
if (a.points == null)
|
return { ...t, points: a.points! }
|
||||||
throw Error(`Points are null for ${t.taskReference}`)
|
|
||||||
return { ...t, points: a.points }
|
|
||||||
}))
|
}))
|
||||||
|
|
||||||
tasks = { ...tasks, tasks: loadedTasks }
|
tasks = { ...tasks, tasks: loadedTasks }
|
||||||
|
|
Reference in a new issue