mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
rename merge with customizer variables
This commit is contained in:
parent
76eb559466
commit
a8af01763c
@ -386,8 +386,8 @@ const createEntityManager = (db) => {
|
||||
const dataToInsert = flow(
|
||||
// Omit unwanted properties
|
||||
omit(['id', 'created_at', 'updated_at']),
|
||||
// Merge with provided data, override to null if data attribute is null
|
||||
mergeWith(params.data || {}, (a, b) => (b === null ? b : a)),
|
||||
// Merge with provided data, set attribute to null if data attribute is null
|
||||
mergeWith(data || {}, (original, override) => (override === null ? override : original)),
|
||||
// Process data with metadata
|
||||
(entity) => processData(metadata, entity, { withDefaults: true })
|
||||
)(entity);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user