@nocobase/database 0.16.0-alpha.6 → 0.17.0-alpha.2

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.
package/lib/collection.js CHANGED
@@ -219,14 +219,15 @@ const _Collection = class _Collection extends import_events.EventEmitter {
219
219
  this.db.logger.warn(
220
220
  `source collection "${sourceCollectionName}" not found for field "${name}" at collection "${this.name}"`
221
221
  );
222
- }
223
- const sourceField = sourceCollection.fields.get(sourceFieldName);
224
- if (!sourceField) {
225
- this.db.logger.warn(
226
- `source field "${sourceFieldName}" not found for field "${name}" at collection "${this.name}"`
227
- );
228
222
  } else {
229
- options = { ...import_lodash.default.omit(sourceField.options, ["name", "primaryKey"]), ...options };
223
+ const sourceField = sourceCollection.fields.get(sourceFieldName);
224
+ if (!sourceField) {
225
+ this.db.logger.warn(
226
+ `source field "${sourceFieldName}" not found for field "${name}" at collection "${this.name}"`
227
+ );
228
+ } else {
229
+ options = { ...import_lodash.default.omit(sourceField.options, ["name", "primaryKey"]), ...options };
230
+ }
230
231
  }
231
232
  }
232
233
  this.emit("field.beforeAdd", name, options, { collection: this });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nocobase/database",
3
- "version": "0.16.0-alpha.6",
3
+ "version": "0.17.0-alpha.2",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "license": "Apache-2.0",
8
8
  "dependencies": {
9
- "@nocobase/logger": "0.16.0-alpha.6",
10
- "@nocobase/utils": "0.16.0-alpha.6",
9
+ "@nocobase/logger": "0.17.0-alpha.2",
10
+ "@nocobase/utils": "0.17.0-alpha.2",
11
11
  "async-mutex": "^0.3.2",
12
12
  "cron-parser": "4.4.0",
13
13
  "dayjs": "^1.11.8",
@@ -33,5 +33,5 @@
33
33
  "url": "git+https://github.com/nocobase/nocobase.git",
34
34
  "directory": "packages/database"
35
35
  },
36
- "gitHead": "e8ad2328a8f85289cb19a7994d3fd726c7ae1720"
36
+ "gitHead": "c4d4383a1fde1058011e2f1fd1d9272812e6daeb"
37
37
  }