[Emails migration] Fix email field migration (#7065)
Fix email field migration - Remove deprecated field of type Email - Add standard emails field on person to person views in position 4
This commit is contained in:
@ -98,4 +98,26 @@ export class ViewService {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async getViewsIdsForObjectMetadataId({
|
||||
workspaceId,
|
||||
objectMetadataId,
|
||||
}: {
|
||||
workspaceId: string;
|
||||
objectMetadataId: string;
|
||||
}) {
|
||||
const viewRepository =
|
||||
await this.twentyORMGlobalManager.getRepositoryForWorkspace(
|
||||
workspaceId,
|
||||
'view',
|
||||
);
|
||||
|
||||
return viewRepository
|
||||
.find({
|
||||
where: {
|
||||
objectMetadataId: objectMetadataId,
|
||||
},
|
||||
})
|
||||
.then((views) => views.map((view) => view.id));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user