From a3825258a86c058f22afb559a02139a82f8ce9b4 Mon Sep 17 00:00:00 2001 From: birloiflorian Date: Wed, 14 Aug 2024 11:55:30 +0300 Subject: [PATCH] fix: 283 - show public events also for going query (#360) Co-authored-by: Birloi Florian --- backend/src/modules/event/repositories/event.repository.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/modules/event/repositories/event.repository.ts b/backend/src/modules/event/repositories/event.repository.ts index 7297fb149..609f95603 100644 --- a/backend/src/modules/event/repositories/event.repository.ts +++ b/backend/src/modules/event/repositories/event.repository.ts @@ -255,10 +255,11 @@ export class EventRepository const query = this.createSelectOpenOrganizationGoingEventsBaseSelectQuery(); query.andWhere( - '(event.endDate > :currentDate OR event.endDate IS NULL) AND v.status = :active AND v.userId = :userId', + '(event.endDate > :currentDate OR event.endDate IS NULL) AND ((v.status = :active AND v.userId = :userId) OR event.isPublic = :isPublic)', { currentDate: new Date(), active: VolunteerStatus.ACTIVE, + isPublic: true, }, );