morph fix for release 1.4 (#14029)
DataLoader Specific update du to Morph relations that have many rows Fixes https://github.com/twentyhq/twenty/issues/14018
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
import { type FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto';
|
||||
|
||||
export const filterMorphRelationDuplicateFieldsDTO = (
|
||||
fields: FieldMetadataDTO[],
|
||||
export const filterMorphRelationDuplicateFieldsDTO = <
|
||||
T extends { name: string; id: string },
|
||||
>(
|
||||
fields: T[],
|
||||
) => {
|
||||
return fields.filter((currentField) => {
|
||||
return !fields.some(
|
||||
|
||||
Reference in New Issue
Block a user