From 1fe9cba239a18ed9d7db37658164a134b38a71ce Mon Sep 17 00:00:00 2001 From: Craig Williams Date: Tue, 15 Mar 2022 12:17:40 +0000 Subject: [PATCH] Fixed nesting of sprunje where clause --- src/Controller/OrganisationController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controller/OrganisationController.php b/src/Controller/OrganisationController.php index a37305b..1cb09c2 100644 --- a/src/Controller/OrganisationController.php +++ b/src/Controller/OrganisationController.php @@ -645,8 +645,9 @@ class OrganisationController extends SimpleController }); if (!$currentUser->isMaster() && $currentUser->roles()->where('slug', 'organisations-admin')->count() == 0) { $sprunje->extendQuery(function ($query) { - return $query->where('flag_approved', true) - ->orWhereNotNull('is_member'); + return $query->where(function($query) { + $query->where('flag_approved', true)->orWhereNotNull('is_member'); + }); }); }