mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix psdoc override with same rid
This commit is contained in:
1 file changed
+2
-1
@@ -421,7 +421,8 @@ export class ProblemModel {
|
||||
domainId: string, pid: number, uid: 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(
|
||||
domainId, document.TYPE_PROBLEM, pid, uid,
|
||||
condition, { rid, status, score },
|
||||
|
||||
Reference in new issue
Block a user