Don't reuse task ID

This commit is contained in:
Zaid Abdulla committed 2019-06-05 00:17:36 -07:00
1 parent 2b9033db19
commit bacf4c27f5
1 file changed
+4 -1
+4 -1
View File
@@ -72,7 +72,10 @@ export async function postTasks(
tasks,
timeout
): Promise<{ connectionRequest: string; tasks: any[] }> {
for (const task of tasks) task.device = deviceId;
for (const task of tasks) {
delete task._id;
task.device = deviceId;
}
tasks = await insertTasks(tasks);
const statuses = tasks.map(t => {