Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion inc/ocsprocess.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,8 @@ public static function importComputer($import_params)
//No entity or location predefined, check rules
if ($defaultentity == -1) {
//Try to affect computer to an entity
$rule = new RuleImportEntityCollection();
//$rule = new RuleImportEntityCollection();
$rule = new RuleImportAssetCollection();

$input = [
'itemtype' => "Computer",
Expand Down Expand Up @@ -556,6 +557,8 @@ public static function importComputer($import_params)
['ocsid' => $ocsid]
);

$data['entities_id']=$data['rules_id'];

if (isset($data['_ignore_import']) && $data['_ignore_import'] == 1) {
//ELSE Return code to indicates that the machine was not imported because it doesn't matched rules
return ['status' => self::COMPUTER_LINK_REFUSED,
Expand Down