From 7f66eb9459765559f97d593af587c1a1af71e970 Mon Sep 17 00:00:00 2001 From: Weiko Date: Thu, 21 Dec 2023 16:32:49 +0100 Subject: [PATCH] Filter out system object for relation object destination (#3108) filter out system object for relation object destination --- .../components/SettingsObjectFieldRelationForm.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldRelationForm.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldRelationForm.tsx index 332b1122bf..1b409a9833 100644 --- a/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldRelationForm.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsObjectFieldRelationForm.tsx @@ -89,11 +89,13 @@ export const SettingsObjectFieldRelationForm = ({ fullWidth disabled={disableRelationEdition} value={values.objectMetadataId} - options={objectMetadataItems.map((objectMetadataItem) => ({ - label: objectMetadataItem.labelPlural, - value: objectMetadataItem.id, - Icon: getIcon(objectMetadataItem.icon), - }))} + options={objectMetadataItems + .filter((objectMetadataItem) => !objectMetadataItem.isSystem) + .map((objectMetadataItem) => ({ + label: objectMetadataItem.labelPlural, + value: objectMetadataItem.id, + Icon: getIcon(objectMetadataItem.icon), + }))} onChange={(value) => onChange({ objectMetadataId: value })} />