diff --git a/packages/twenty-front/src/modules/activities/files/hooks/useUploadAttachmentFile.tsx b/packages/twenty-front/src/modules/activities/files/hooks/useUploadAttachmentFile.tsx index b872acab5..2d94d15d8 100644 --- a/packages/twenty-front/src/modules/activities/files/hooks/useUploadAttachmentFile.tsx +++ b/packages/twenty-front/src/modules/activities/files/hooks/useUploadAttachmentFile.tsx @@ -45,6 +45,7 @@ export const useUploadAttachmentFile = () => { fullPath: attachmentUrl, type: getFileType(file.name), [targetableObjectFieldIdName]: targetableObject.id, + createdAt: new Date().toISOString(), } as Partial; await createOneAttachment(attachmentToCreate); diff --git a/packages/twenty-front/src/modules/attachments/types/Attachment.ts b/packages/twenty-front/src/modules/attachments/types/Attachment.ts index 657ce6b48..563e516d2 100644 --- a/packages/twenty-front/src/modules/attachments/types/Attachment.ts +++ b/packages/twenty-front/src/modules/attachments/types/Attachment.ts @@ -1,6 +1,6 @@ export type Attachment = { id: string; - createdAt: Date; + createdAt: string; updatedAt: Date; deletedAt: Date | null; };