mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix submission calculation
This commit is contained in:
1 parent
34c75c94fd
commit
aa3721fdc1
2 files changed
+2
-5
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.4.3",
|
"version": "3.4.4",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -436,10 +436,7 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
|||||||
const rdoc = await record.get(domainId, rid);
|
const rdoc = await record.get(domainId, rid);
|
||||||
if (!pretest) {
|
if (!pretest) {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
(this.tdoc
|
problem.inc(this.domainId, this.pdoc.docId, 'nSubmit', 1),
|
||||||
? (this.tsdoc.journal || []).filter((i) => i.pid === this.pdoc.docId).length
|
|
||||||
: this.psdoc?.rid ? Promise.resolve() : problem.inc(domainId, this.pdoc.docId, 'nSubmit', 1)
|
|
||||||
) && problem.inc(this.domainId, this.pdoc.docId, 'nSubmit', 1),
|
|
||||||
problem.incStatus(domainId, this.pdoc.docId, this.user._id, 'nSubmit', 1),
|
problem.incStatus(domainId, this.pdoc.docId, this.user._id, 'nSubmit', 1),
|
||||||
domain.incUserInDomain(domainId, this.user._id, 'nSubmit'),
|
domain.incUserInDomain(domainId, this.user._id, 'nSubmit'),
|
||||||
tid && contest.updateStatus(domainId, tid, this.user._id, rid, this.pdoc.docId),
|
tid && contest.updateStatus(domainId, tid, this.user._id, rid, this.pdoc.docId),
|
||||||
|
|||||||
Reference in new issue
Block a user