diff --git a/app/core/services/public-cloud-request.ts b/app/core/services/public-cloud-request.ts index 414503ad2..52cdc0a4d 100644 --- a/app/core/services/public-cloud-request.ts +++ b/app/core/services/public-cloud-request.ts @@ -30,14 +30,13 @@ export class PublicCloudRequestService extends ModelService licencePlate); - const mouRelatedRequestIds = this.session.tasks + const licencePlatesFromTasks = this.session.tasks .filter((task) => [TaskType.SIGN_MOU, TaskType.REVIEW_MOU].includes(task.type)) .map((task) => (task.data as { licencePlate: string }).licencePlate); const baseFilter: Prisma.PublicCloudRequestWhereInput = { OR: [ - { licencePlate: { in: licencePlates } }, - { id: { in: mouRelatedRequestIds } }, + { licencePlate: { in: [...licencePlates, ...licencePlatesFromTasks] } }, { type: RequestType.CREATE, createdByEmail: { equals: this.session.user.email, mode: 'insensitive' } }, ], };