Add viewField creation to fieldMetadata creation service (#2685)
* Add viewField creation to fieldMetadata creation service * fix reduce with no initial value
This commit is contained in:
@ -54,6 +54,12 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
|
||||
record.workspaceId,
|
||||
);
|
||||
|
||||
if (record.labelSingular === record.labelPlural) {
|
||||
throw new Error(
|
||||
'The singular and plural labels cannot be the same for an object',
|
||||
);
|
||||
}
|
||||
|
||||
const createdObjectMetadata = await super.createOne({
|
||||
...record,
|
||||
dataSourceId: lastDataSourceMetadata.id,
|
||||
|
||||
Reference in New Issue
Block a user