Skip to content

Commit

Permalink
Fix broken manual device create when device is a computer and no oa_g…
Browse files Browse the repository at this point in the history
…roup supplied.
  • Loading branch information
mark-unwin committed Jun 19, 2018
1 parent b39cd20 commit d090290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code_igniter/application/models/m_devices_components.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public function process_component($table = '', $details, $input, $display = 'n',
$this->m_networks->upsert($network);
}
}
if ($details->type == 'computer' and $details->os_group == 'VMware') {
if ($details->type == 'computer' and !empty($details->os_group) and $details->os_group == 'VMware') {
# TODO - fix the below somewhow ?!??
# the issue is that ESXi provides different values for network cards from the command line and from SNMP
$sql = "DELETE FROM `ip` WHERE `ip`.`system_id` = ?";
Expand Down

0 comments on commit d090290

Please sign in to comment.