@strapi/database 5.0.0-rc.17 → 5.0.0-rc.18
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/dist/entity-manager/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entity-manager/index.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAsB,MAAM,SAAS,CAAC;AAE5D,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entity-manager/index.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAsB,MAAM,SAAS,CAAC;AAE5D,cAAc,SAAS,CAAC;AAyLxB,eAAO,MAAM,mBAAmB,OAAQ,QAAQ,KAAG,aA2kClD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5297,8 +5297,10 @@ const processData = (metadata, data = {}, { withDefaults = false } = {}) => {
|
|
|
5297
5297
|
if ("joinColumn" in attribute && attribute.joinColumn && attribute.owner) {
|
|
5298
5298
|
const joinColumnName = attribute.joinColumn.name;
|
|
5299
5299
|
const attrValue = !_.isUndefined(data[attributeName]) ? data[attributeName] : data[joinColumnName];
|
|
5300
|
-
if (
|
|
5300
|
+
if (_.isNull(attrValue)) {
|
|
5301
5301
|
obj[joinColumnName] = attrValue;
|
|
5302
|
+
} else if (!_.isUndefined(attrValue)) {
|
|
5303
|
+
obj[joinColumnName] = toId(attrValue);
|
|
5302
5304
|
}
|
|
5303
5305
|
continue;
|
|
5304
5306
|
}
|