mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: record_not_found error
This commit is contained in:
1 parent
585d8aa2e1
commit
b6441b853b
2 files changed
+2
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.28.13",
|
||||
"version": "2.28.14",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -38,6 +38,7 @@ class RecordModel {
|
||||
const _id = arg1 || arg0;
|
||||
const domainId = arg1 ? arg0 : null;
|
||||
const res = await RecordModel.coll.findOne({ _id });
|
||||
if (!res) return null;
|
||||
if (res.domainId === (domainId || res.domainId)) return res;
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user