Fix export with relations (#5279)

As title. Only relations are exported right now

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette 2024-05-03 16:14:37 +02:00 committed by GitHub
parent 1d9cd234ea
commit 5285a428d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,7 @@ export const generateCsv: GenerateExport = ({
}: GenerateExportOptions): string => {
const columnsToExport = columns.filter(
(col) =>
!('relationType' in col.metadata) ||
!('relationType' in col.metadata && col.metadata.relationType) ||
col.metadata.relationType === 'TO_ONE_OBJECT',
);