core: bug fix

This commit is contained in:
undefined committed 2023-06-05 22:46:03 +08:00
1 parent b8bbd504b0
commit e061a4b032
1 file changed
+2 -2
+2 -2
View File
@@ -451,9 +451,9 @@ export class ProblemModel {
if (pid) {
if (preferredPrefix) {
const newPid = pid.replace(/^[A-Za-z]+/, preferredPrefix);
if (isValidPid(newPid)) pid = newPid;
if (await isValidPid(newPid)) pid = newPid;
}
if (!isValidPid(pid)) pid = undefined;
if (!await isValidPid(pid)) pid = undefined;
}
const overrideContent = findOverrideContent(path.join(tmpdir, i));
const docId = await ProblemModel.add(