core: patch homeworks created in contest handler

This commit is contained in:
undefined committed 2022-07-21 19:04:20 +08:00
1 parent 1c3ea21283
commit 4b3c57549a
2 files changed
+8 -1

No files matched your search

+7
View File
@@ -784,6 +784,13 @@ const scripts: UpgradeScript[] = [
}
return true;
},
async function _63_64() {
await db.collection('document').updateMany(
{ rule: 'homework', penaltySince: { $exists: false } },
{ $set: { penaltySince: new Date() } },
);
return true;
},
];
export default scripts;