Fix custom object renaming (#8746)
Currently when renaming an object, we execute
```
await this.fieldMetadataRepository
.findOneByOrFail({
name: existingObjectMetadata.nameSingular,
label: existingObjectMetadata.labelSingular,
objectMetadataId: relatedObject.id,
workspaceId: workspaceId,
})
```
to find the standard relation fields.
This would throw an error if the label solely was update beforehand
without updating the name too: in that case we will not have migrated
the label of the standard relation fields (which is maybe a mistake?
@Weiko wdyt?).
Let's remove it.
This commit is contained in:
@ -165,12 +165,11 @@ export class ObjectMetadataMigrationService {
|
||||
});
|
||||
|
||||
if (relatedObject) {
|
||||
// 1. Update to and from relation fieldMetadata)
|
||||
// 1. Update to and from relation fieldMetadata
|
||||
const toFieldRelationFieldMetadataId =
|
||||
await this.fieldMetadataRepository
|
||||
.findOneByOrFail({
|
||||
name: existingObjectMetadata.nameSingular,
|
||||
label: existingObjectMetadata.labelSingular,
|
||||
objectMetadataId: relatedObject.id,
|
||||
workspaceId: workspaceId,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user