Fix bug listing allocations when making a new server.

closes #730
This commit is contained in:
Dane Everitt 2017-11-05 14:12:53 -06:00
parent 3b5e1fc7b1
commit ac2abd89e6
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 9 additions and 31 deletions

View file

@ -129,9 +129,9 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
/**
* {@inheritdoc}
*/
public function getNodesForLocation($location)
public function getNodesForServerCreation()
{
$instance = $this->getBuilder()->with('allocations')->where('location_id', $location)->get();
$instance = $this->getBuilder()->with('allocations')->get();
return $instance->map(function ($item) {
$filtered = $item->allocations->where('server_id', null)->map(function ($map) {