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