core: record_not_found error

This commit is contained in:
undefined committed 2021-05-31 13:47:04 +08:00
1 parent 585d8aa2e1
commit b6441b853b
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -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;
}