Fix standard object computed metadata (#12883)

# Introduction
close https://github.com/twentyhq/twenty/issues/12879

This PR has a global impact all on workspaces
It should be crash tested in local using an anon extract of the db
This commit is contained in:
Paul Rastoin
2025-06-26 13:38:52 +02:00
committed by GitHub
parent 2ca43e18e9
commit 2d774767c0
9 changed files with 136 additions and 42 deletions

View File

@ -121,7 +121,7 @@ export class StandardFieldFactory {
* Create field metadata
*/
private createFieldMetadata(
workspaceEntityMetadataArgs: WorkspaceEntityMetadataArgs | undefined,
_workspaceEntityMetadataArgs: WorkspaceEntityMetadataArgs | undefined,
workspaceFieldMetadataArgs: WorkspaceFieldMetadataArgs,
context: WorkspaceSyncContext,
): PartialFieldMetadata[] {
@ -153,7 +153,7 @@ export class StandardFieldFactory {
isActive: workspaceFieldMetadataArgs.isActive ?? true,
asExpression: workspaceFieldMetadataArgs.asExpression,
generatedType: workspaceFieldMetadataArgs.generatedType,
isLabelSyncedWithName: true,
isLabelSyncedWithName: workspaceFieldMetadataArgs.isLabelSyncedWithName,
},
];
}
@ -192,7 +192,8 @@ export class StandardFieldFactory {
isNullable: true,
isUnique: false,
isActive: workspaceRelationMetadataArgs.isActive ?? true,
isLabelSyncedWithName: true,
isLabelSyncedWithName:
workspaceRelationMetadataArgs.isLabelSyncedWithName,
});
return fieldMetadataCollection;