thanks @Molmin
This commit is contained in:
undefined committed 2024-08-10 22:24:54 +08:00
1 parent 609466016c
commit a1d392a409
4 files changed
+27 -34

No files matched your search

+2 -1
View File
@@ -162,7 +162,8 @@ export class ProblemModel {
if (Number.isSafeInteger(+pid)) pid = +pid;
const res = typeof pid === 'number'
? await document.get(domainId, document.TYPE_PROBLEM, pid, projection)
: (await document.getMulti(domainId, document.TYPE_PROBLEM, { sort: sortable(pid), pid }).toArray())[0];
: (await document.getMulti(domainId, document.TYPE_PROBLEM, { sort: sortable(pid), pid })
.project(buildProjection(projection)).limit(1).toArray())[0];
if (!res) return null;
try {
if (!rawConfig) res.config = await parseConfig(res.config);