Skip to content

The open alternative to Salesforce, designed for AI.

Set attachment authorId nullable (#10908)

Weikoef251f812983
diff --git a/packages/twenty-server/src/modules/attachment/standard-objects/attachment.workspace-entity.ts b/packages/twenty-server/src/modules/attachment/standard-objects/attachment.workspace-entity.ts
index aa0f9f661f0..6c5577391c1 100644
--- a/packages/twenty-server/src/modules/attachment/standard-objects/attachment.workspace-entity.ts
+++ b/packages/twenty-server/src/modules/attachment/standard-objects/attachment.workspace-entity.ts
@@ -72,10 +72,11 @@ export class AttachmentWorkspaceEntity extends BaseWorkspaceEntity {
inverseSideTarget: () => WorkspaceMemberWorkspaceEntity,
inverseSideFieldKey: 'authoredAttachments',
})
- author: Relation<WorkspaceMemberWorkspaceEntity>;
+ @WorkspaceIsNullable()
+ author: Relation<WorkspaceMemberWorkspaceEntity> | null;
@WorkspaceJoinColumn('author')
- authorId: string;
+ authorId: string | null;
@WorkspaceRelation({
standardId: ATTACHMENT_STANDARD_FIELD_IDS.task,