diff --git a/app/Http/Controllers/Api/LocationsController.php b/app/Http/Controllers/Api/LocationsController.php index 054d7b6610..52ef4ab937 100644 --- a/app/Http/Controllers/Api/LocationsController.php +++ b/app/Http/Controllers/Api/LocationsController.php @@ -245,7 +245,7 @@ class LocationsController extends Controller { $this->authorize('view', Accessory::class); $this->authorize('view', $location); - $accessory_checkouts = AccessoryCheckout::LocationAssigned()->with('adminuser')->with('accessories')->where('assigned_to', '=', $location->id); + $accessory_checkouts = AccessoryCheckout::LocationAssigned()->with('adminuser')->with('accessories'); $offset = ($request->input('offset') > $accessory_checkouts->count()) ? $accessory_checkouts->count() : app('api_offset_value'); $limit = app('api_limit_value');