From 8f50c489c956ae466569289d868554d3d377c377 Mon Sep 17 00:00:00 2001 From: Dave Earley Date: Thu, 22 Aug 2024 07:40:52 -0700 Subject: [PATCH] Fix organizer event list --- backend/app/Repository/Eloquent/EventRepository.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/app/Repository/Eloquent/EventRepository.php b/backend/app/Repository/Eloquent/EventRepository.php index 4ac9cc83..1ac1d6c9 100644 --- a/backend/app/Repository/Eloquent/EventRepository.php +++ b/backend/app/Repository/Eloquent/EventRepository.php @@ -53,13 +53,7 @@ public function findEvents(array $where, QueryParamsDTO $params): LengthAwarePag $organizerId = $params->filter_fields->first(fn ($filter) => $filter->field === EventDomainObjectAbstract::ORGANIZER_ID)?->value; if ($organizerId) { - $where[] = static function (Builder $builder) use ($params) { - $builder - ->where(EventDomainObjectAbstract::ORGANIZER_ID, $params - ->filter_fields - ->get(EventDomainObjectAbstract::ORGANIZER_ID) - ); - }; + $this->model = $this->model->where(EventDomainObjectAbstract::ORGANIZER_ID, $organizerId); } }