Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Adjust attachment mime type precedence in fakerest

Anibal Svarcase072af3bc97b
diff --git a/src/components/atomic-crm/providers/fakerest/dataProvider.ts b/src/components/atomic-crm/providers/fakerest/dataProvider.ts
index 91631e4f..1b7afeac 100644
--- a/src/components/atomic-crm/providers/fakerest/dataProvider.ts
+++ b/src/components/atomic-crm/providers/fakerest/dataProvider.ts
@@ -253,7 +253,7 @@ const preserveAttachmentMimeType = <
...note,
attachments: (note.attachments ?? []).map((attachment) => ({
...attachment,
- type: attachment.rawFile?.type ?? attachment.type,
+ type: attachment.type ?? attachment.rawFile?.type,
})),
});