core: fix record stat update

This commit is contained in:
undefined committed 2024-05-29 21:59:53 +08:00
1 parent 8619261bd4
commit a7d6265f97
3 files changed
+11 -27

No files matched your search

+1 -1
View File
@@ -264,7 +264,7 @@ export function apply(ctx: Context) {
]));
ctx.on('domain/delete', (domainId) => RecordModel.coll.deleteMany({ domainId }));
ctx.on('record/judge', async (rdoc, updated) => {
if (rdoc.status === STATUS.STATUS_ACCEPTED && updated && !rdoc.contest) {
if (rdoc.status === STATUS.STATUS_ACCEPTED && updated) {
await RecordModel.collStat.updateOne({
_id: rdoc._id,
}, {