Use left join, not inner here
This commit is contained in:
parent
7562e501af
commit
f61a5fa0cb
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
|
||||||
$instance = $this->getBuilder()
|
$instance = $this->getBuilder()
|
||||||
->select(['nodes.id', 'nodes.memory', 'nodes.disk', 'nodes.memory_overallocate', 'nodes.disk_overallocate'])
|
->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')
|
->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);
|
->where('nodes.public', 1);
|
||||||
|
|
||||||
if (! empty($locations)) {
|
if (! empty($locations)) {
|
||||||
|
|
Loading…
Reference in a new issue