diff --git a/datamodels/2.x/itop-attachments/module.itop-attachments.php b/datamodels/2.x/itop-attachments/module.itop-attachments.php index cebd8da03..f8ae08ba1 100644 --- a/datamodels/2.x/itop-attachments/module.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/module.itop-attachments.php @@ -179,7 +179,7 @@ SQL; $iUpdated = 0; while ($oAttachment = $oSet->Fetch()) { - if ($oAttachment->Get('item_id') == 0) { + if (empty($oAttachment->Get('item_class'))) { //do not treat orphan attachment continue; }