@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
package/dist/index.mjs
CHANGED
|
@@ -5265,8 +5265,10 @@ const processData = (metadata, data = {}, { withDefaults = false } = {}) => {
|
|
|
5265
5265
|
if ("joinColumn" in attribute && attribute.joinColumn && attribute.owner) {
|
|
5266
5266
|
const joinColumnName = attribute.joinColumn.name;
|
|
5267
5267
|
const attrValue = !isUndefined(data[attributeName]) ? data[attributeName] : data[joinColumnName];
|
|
5268
|
-
if (
|
|
5268
|
+
if (isNull(attrValue)) {
|
|
5269
5269
|
obj[joinColumnName] = attrValue;
|
|
5270
|
+
} else if (!isUndefined(attrValue)) {
|
|
5271
|
+
obj[joinColumnName] = toId(attrValue);
|
|
5270
5272
|
}
|
|
5271
5273
|
continue;
|
|
5272
5274
|
}
|