diff --git a/src/Bundle/ChillMainBundle/Controller/LocationApiController.php b/src/Bundle/ChillMainBundle/Controller/LocationApiController.php index 525475e3c..aa5f46f1a 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationApiController.php @@ -21,11 +21,14 @@ class LocationApiController extends ApiController { public function customizeQuery(string $action, Request $request, $query): void { - $query->andWhere( - $query->expr()->andX( + $query + ->leftJoin('e.locationType', 'lt') + ->andWhere( + $query->expr()->andX( $query->expr()->eq('e.availableForUsers', "'TRUE'"), + $query->expr()->eq('lt.availableForUsers', "'TRUE'"), $query->expr()->eq('e.active', "'TRUE'"), ) - ); + ); } }