@@ -151,7 +151,7 @@ EOT
'fixed_address' => $fixedIP ?: null,
'fixedIP' => $fixedIP ? true : false,
];
- if ($type == 'mta' || $type == 'cpe') {
+ if (isset($hostId) && ($type == 'mta' || $type == 'cpe')) {
unset($data['mac']);
$data['host'] = $hostId;