core: bug fix

pull/588/head
undefined 1 year ago
parent b8bbd504b0
commit e061a4b032
No known key found for this signature in database

@ -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(

Loading…
Cancel
Save