core: remove unexpected access to tdoc

This commit is contained in:
undefined committed 2021-05-29 13:14:34 +08:00
1 parent d0116ac43a
commit b4bb02bd57
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.28.6",
"version": "2.28.7",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
+2 -2
View File
@@ -283,8 +283,8 @@ class HomeworkEditHandler extends Handler {
datePenaltyText: penaltySince.format('YYYY-M-D'),
timePenaltyText: penaltySince.format('hh:mm'),
extensionDays,
penaltyRules: yaml.dump(tdoc.penaltyRules),
pids: tdoc.pids.join(','),
penaltyRules: tid ? yaml.dump(tdoc.penaltyRules) : null,
pids: tid ? tdoc.pids.join(',') : '',
path,
page_name: tid ? 'homework_edit' : 'homework_create',
};