mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
import-qduoj: fix import with empty tags
This commit is contained in:
1 parent
bd13c57d82
commit
080621738e
2 files changed
+5
-2
No files matched your search
@@ -79,7 +79,10 @@ class ImportQduojHandler extends Handler {
|
||||
if (+pdoc.display_id) pdoc.display_id = `P${pdoc.display_id}`;
|
||||
const n = await ProblemModel.get(domainId, pdoc.display_id);
|
||||
if (n) pdoc.display_id = null;
|
||||
const pid = await ProblemModel.add(domainId, pdoc.display_id, pdoc.title, buildContent(content, 'html'), this.user._id, pdoc.tags);
|
||||
const pid = await ProblemModel.add(
|
||||
domainId, pdoc.display_id, pdoc.title, buildContent(content, 'html'),
|
||||
this.user._id, pdoc.tags || [],
|
||||
);
|
||||
const config: ProblemConfigFile = {
|
||||
time: `${pdoc.time_limit}ms`,
|
||||
memory: `${pdoc.memory_limit}m`,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/import-qduoj",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.3",
|
||||
"description": "Import QDUOJ problem export",
|
||||
"main": "index.ts",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user