core: homework: fix penaltyRules validate

This commit is contained in:
undefined committed 2025-04-16 13:13:26 +08:00
1 parent 083b5b6641
commit 0bff54d568
3 files changed
+13 -2

No files matched your search

+1
View File
@@ -145,6 +145,7 @@ export class ProblemModel {
tag: string[] = [], meta: ProblemCreateOptions = {},
) {
const [doc] = await ProblemModel.getMulti(domainId, {})
.withReadPreference('primary')
.sort({ docId: -1 }).limit(1).project({ docId: 1 })
.toArray();
const result = await ProblemModel.addWithId(