Misc. bug fixes
This commit is contained in:
parent
844ebfaf64
commit
27d472195f
2 changed files with 2 additions and 1 deletions
|
@ -225,7 +225,7 @@ class PackRepository
|
|||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
$pack = Models\Pack::withCount('servers')->findOrFail($id);
|
||||
$pack = Pack::withCount('servers')->findOrFail($id);
|
||||
|
||||
if ($pack->servers_count > 0) {
|
||||
throw new DisplayException('Cannot delete a pack from the system if servers are assocaited with it.');
|
||||
|
|
|
@ -248,6 +248,7 @@ class ServerRepository
|
|||
'uuidShort' => $genShortUuid,
|
||||
'node_id' => $node->id,
|
||||
'name' => $data['name'],
|
||||
'description' => $data['description'],
|
||||
'suspended' => 0,
|
||||
'owner_id' => $user->id,
|
||||
'memory' => $data['memory'],
|
||||
|
|
Loading…
Reference in a new issue