mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui&core: bug fix
This commit is contained in:
1 parent
3a518010be
commit
72b46857ba
5 files changed
+8
-6
No files matched your search
@@ -219,8 +219,9 @@ export class ContestEditHandler extends Handler {
|
||||
title: string, content: string, rule: string, _pids: string, rated = false,
|
||||
) {
|
||||
const pids = _pids.replace(/,/g, ',').split(',').map((i) => {
|
||||
i = i.trim();
|
||||
if ((+i).toString() === i) return +i;
|
||||
return i.trim();
|
||||
return i;
|
||||
}).filter((i) => i);
|
||||
const beginAtMoment = moment.tz(`${beginAtDate} ${beginAtTime}`, this.user.timeZone);
|
||||
if (!beginAtMoment.isValid()) throw new ValidationError('beginAtDate', 'beginAtTime');
|
||||
|
||||
@@ -306,8 +306,9 @@ class HomeworkEditHandler extends Handler {
|
||||
penaltyRules: PenaltyRules, title: string, content: string, _pids: string, rated = false,
|
||||
) {
|
||||
const pids = _pids.replace(/,/g, ',').split(',').map((i) => {
|
||||
i = i.trim();
|
||||
if ((+i).toString() === i) return +i;
|
||||
return i.trim();
|
||||
return i;
|
||||
}).filter((i) => i);
|
||||
const tdoc = tid
|
||||
? await contest.get(domainId, tid, document.TYPE_HOMEWORK)
|
||||
|
||||
Reference in new issue
Block a user