core: training.getList: use string as index

This commit is contained in:
undefined committed 2021-08-08 18:34:16 +08:00
1 parent a908252c57
commit bbca622353
1 file changed
+1 -1
+1 -1
View File
@@ -112,7 +112,7 @@ export async function getList(domainId: string, tids: ObjectID[]) {
domainId, { _id: { $in: Array.from(new Set(tids)) } },
).toArray();
const r = {};
for (const tdoc of tdocs) r[tdoc.docId] = tdoc;
for (const tdoc of tdocs) r[tdoc.docId.toString()] = tdoc;
return r;
}