Fix input position backfill (#5731)

Some objects do not have position field so they should not be backfilled
This commit is contained in:
Thomas Trompette
2024-06-04 13:26:40 +02:00
committed by GitHub
parent a4e5e486f5
commit b1f12d7257
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,6 @@
import { ObjectMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/object-metadata.interface';
export const hasPositionField = (objectMetadataItem: ObjectMetadataInterface) =>
['opportunity', 'person', 'company'].includes(
objectMetadataItem.nameSingular,
) || objectMetadataItem.isCustom;