Misc. bug fixes

This commit is contained in:
Dane Everitt 2017-04-01 12:29:56 -04:00
parent 844ebfaf64
commit 27d472195f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 2 additions and 1 deletions

View file

@ -225,7 +225,7 @@ class PackRepository
*/ */
public function delete($id) public function delete($id)
{ {
$pack = Models\Pack::withCount('servers')->findOrFail($id); $pack = Pack::withCount('servers')->findOrFail($id);
if ($pack->servers_count > 0) { if ($pack->servers_count > 0) {
throw new DisplayException('Cannot delete a pack from the system if servers are assocaited with it.'); throw new DisplayException('Cannot delete a pack from the system if servers are assocaited with it.');

View file

@ -248,6 +248,7 @@ class ServerRepository
'uuidShort' => $genShortUuid, 'uuidShort' => $genShortUuid,
'node_id' => $node->id, 'node_id' => $node->id,
'name' => $data['name'], 'name' => $data['name'],
'description' => $data['description'],
'suspended' => 0, 'suspended' => 0,
'owner_id' => $user->id, 'owner_id' => $user->id,
'memory' => $data['memory'], 'memory' => $data['memory'],