Fix server editing

This commit is contained in:
Dane Everitt 2017-02-17 18:17:28 -05:00
parent 232e9a05ed
commit ff9904227b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -376,7 +376,7 @@ class ServerRepository
} }
// Update Server Owner if it was passed. // Update Server Owner if it was passed.
if (isset($data['owner']) && $data['owner'] !== $owner->email) { if (isset($data['owner']) && $data['owner'] !== $server->user->email) {
$newOwner = Models\User::select('id')->where('email', $data['owner'])->first(); $newOwner = Models\User::select('id')->where('email', $data['owner'])->first();
$server->owner_id = $newOwner->id; $server->owner_id = $newOwner->id;
} }