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
}
export const getPotentialReferenceIndexes = (hierarchy, record) =>
export const getPotentialReferenceIndexes = (hierarchy, model) =>
pipe(hierarchy, [
hierarchyFunctions.getFlattenedHierarchy,
filter(hierarchyFunctions.isAncestorIndex),
filter(
i =>
hierarchyFunctions.isAncestor(record)(i.parent()) ||
i.parent().nodeId === record.parent().nodeId ||
hierarchyFunctions.isAncestor(model)(i.parent()) ||
i.parent().nodeId === model.parent().nodeId ||
hierarchyFunctions.isRoot(i.parent())
),
])