core: fix psdoc override with same rid

This commit is contained in:
undefined committed 2025-09-04 16:40:47 +08:00
1 parent 3941ab3e6e
commit 184d161ea3
1 file changed
+2 -1
+2 -1
View File
@@ -421,7 +421,8 @@ export class ProblemModel {
domainId: string, pid: number, uid: number, domainId: string, pid: number, uid: number,
rid: ObjectId, status: number, score: number, rid: ObjectId, status: number, score: number,
) { ) {
const condition = status === STATUS.STATUS_ACCEPTED ? {} : { status: { $ne: STATUS.STATUS_ACCEPTED } }; const condition = status === STATUS.STATUS_ACCEPTED ? {}
: { $or: [{ status: { $ne: STATUS.STATUS_ACCEPTED } }, { rid }] };
const res = await document.setStatusIfCondition( const res = await document.setStatusIfCondition(
domainId, document.TYPE_PROBLEM, pid, uid, domainId, document.TYPE_PROBLEM, pid, uid,
condition, { rid, status, score }, condition, { rid, status, score },