Fix https://github.com/twentyhq/core-team-issues/issues/295 Based on the feature-flag `IsNewRelationEnabled` the schema will be marked as outdated and regenerated, this will cause an error on the front-end on the first request on the following ones schema will be well generated ans request will work.
11 lines
468 B
TypeScript
11 lines
468 B
TypeScript
import omit from 'lodash.omit';
|
|
|
|
import { ObjectMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/object-metadata.interface';
|
|
|
|
import { ObjectMetadataItemWithFieldMaps } from 'src/engine/metadata-modules/types/object-metadata-item-with-field-maps';
|
|
|
|
export const removeFieldMapsFromObjectMetadata = (
|
|
objectMetadata: ObjectMetadataItemWithFieldMaps,
|
|
): ObjectMetadataInterface =>
|
|
omit(objectMetadata, ['fieldsById', 'fieldsByName']);
|