update record to model in core

This commit is contained in:
kevmodrome 2020-04-14 12:07:21 +02:00
parent 50abaa4988
commit 672bd8b945
1 changed files with 3 additions and 3 deletions

View File

@ -65,14 +65,14 @@ export const getPotentialReverseReferenceIndexes = (hierarchy, refIndex) => {
return res return res
} }
export const getPotentialReferenceIndexes = (hierarchy, record) => export const getPotentialReferenceIndexes = (hierarchy, model) =>
pipe(hierarchy, [ pipe(hierarchy, [
hierarchyFunctions.getFlattenedHierarchy, hierarchyFunctions.getFlattenedHierarchy,
filter(hierarchyFunctions.isAncestorIndex), filter(hierarchyFunctions.isAncestorIndex),
filter( filter(
i => i =>
hierarchyFunctions.isAncestor(record)(i.parent()) || hierarchyFunctions.isAncestor(model)(i.parent()) ||
i.parent().nodeId === record.parent().nodeId || i.parent().nodeId === model.parent().nodeId ||
hierarchyFunctions.isRoot(i.parent()) hierarchyFunctions.isRoot(i.parent())
), ),
]) ])