@nocobase/database 1.3.48-beta → 1.3.49-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -36,6 +36,7 @@ const _ToManyInterface = class _ToManyInterface extends import_base_interface.Ba
|
|
|
36
36
|
if (!str) {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
|
+
str = `${str}`.trim();
|
|
39
40
|
const items = str.split(",");
|
|
40
41
|
const { filterKey, targetCollection, transaction } = ctx;
|
|
41
42
|
const targetInstances = await targetCollection.repository.find({
|
|
@@ -45,7 +46,7 @@ const _ToManyInterface = class _ToManyInterface extends import_base_interface.Ba
|
|
|
45
46
|
transaction
|
|
46
47
|
});
|
|
47
48
|
items.forEach((item) => {
|
|
48
|
-
if (!targetInstances.find((targetInstance) => targetInstance[filterKey]
|
|
49
|
+
if (!targetInstances.find((targetInstance) => targetInstance[filterKey] == item)) {
|
|
49
50
|
throw new Error(`"${item}" not found in ${targetCollection.model.name} ${filterKey}`);
|
|
50
51
|
}
|
|
51
52
|
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/database",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.49-beta",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"license": "AGPL-3.0",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/logger": "1.3.
|
|
10
|
-
"@nocobase/utils": "1.3.
|
|
9
|
+
"@nocobase/logger": "1.3.49-beta",
|
|
10
|
+
"@nocobase/utils": "1.3.49-beta",
|
|
11
11
|
"async-mutex": "^0.3.2",
|
|
12
12
|
"chalk": "^4.1.1",
|
|
13
13
|
"cron-parser": "4.4.0",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
39
39
|
"directory": "packages/database"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "46dde74e2c220ae19bc275bb40be9ddf52485fa9"
|
|
42
42
|
}
|