Skip to content

Commit

Permalink
item must have a positive id to display a qrcode
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagh authored and trasher committed Dec 6, 2024
1 parent f49fa9f commit 103a18c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BarcodeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function generateQRCode(CommonDBTM $item)
/** @var array $CFG_GLPI */
global $CFG_GLPI;
if (
$item->getId() === -1 ||
$item->isNewItem() ||
!in_array($item::class, $CFG_GLPI["asset_types"])
) {
return false;
Expand Down

0 comments on commit 103a18c

Please sign in to comment.