From f61a5fa0cb89a55f9b8b4101d34c698f88689808 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 17 Feb 2018 15:52:41 -0600 Subject: [PATCH] Use left join, not inner here --- app/Repositories/Eloquent/NodeRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Repositories/Eloquent/NodeRepository.php b/app/Repositories/Eloquent/NodeRepository.php index 6894ad516..b4d6ba6b0 100644 --- a/app/Repositories/Eloquent/NodeRepository.php +++ b/app/Repositories/Eloquent/NodeRepository.php @@ -173,7 +173,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa $instance = $this->getBuilder() ->select(['nodes.id', 'nodes.memory', 'nodes.disk', 'nodes.memory_overallocate', 'nodes.disk_overallocate']) ->selectRaw('IFNULL(SUM(servers.memory), 0) as sum_memory, IFNULL(SUM(servers.disk), 0) as sum_disk') - ->join('servers', 'servers.node_id', '=', 'nodes.id') + ->leftJoin('servers', 'servers.node_id', '=', 'nodes.id') ->where('nodes.public', 1); if (! empty($locations)) {