Fix logic since this accepts arrays now

This commit is contained in:
Dane Everitt 2020-12-24 10:12:01 -08:00
parent 25e53d9f22
commit a2548c14ac
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -114,8 +114,8 @@ class ServerTransferController extends Controller
$transfer->new_node = $node_id; $transfer->new_node = $node_id;
$transfer->old_allocation = $server->allocation_id; $transfer->old_allocation = $server->allocation_id;
$transfer->new_allocation = $allocation_id; $transfer->new_allocation = $allocation_id;
$transfer->old_additional_allocations = json_encode($server->allocations->where('id', '!=', $server->allocation_id)->pluck('id')); $transfer->old_additional_allocations = $server->allocations->where('id', '!=', $server->allocation_id)->pluck('id');
$transfer->new_additional_allocations = json_encode($additional_allocations); $transfer->new_additional_allocations = $additional_allocations;
$transfer->save(); $transfer->save();