mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: import: update pid regex
This commit is contained in:
1 file changed
+1
-1
@@ -442,7 +442,7 @@ export class ProblemModel {
|
|||||||
if (!pdoc) continue;
|
if (!pdoc) continue;
|
||||||
let pid = pdoc.pid;
|
let pid = pdoc.pid;
|
||||||
if (pid) {
|
if (pid) {
|
||||||
if (!(/^[A-Za-z]+[0-9]*$/.test(pid))) pid = undefined;
|
if (!(/^[A-Za-z]+[0-9A-Za-z]*$/.test(pid))) pid = undefined;
|
||||||
else if (await ProblemModel.get(domainId, pid)) pid = undefined;
|
else if (await ProblemModel.get(domainId, pid)) pid = undefined;
|
||||||
}
|
}
|
||||||
const overrideContent = findOverrideContent(path.join(tmpdir, i));
|
const overrideContent = findOverrideContent(path.join(tmpdir, i));
|
||||||
|
|||||||
Reference in new issue
Block a user