Skip to content

Commit

Permalink
Dont get drafts
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Dec 4, 2024
1 parent 308c1e1 commit 2476f81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/services/Inventory.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ public function getInventoryLocationLevels(InventoryLocation $inventoryLocation,
{
$levels = $this->getInventoryLevelQuery(withTrashed: $withTrashed)
->andWhere(['inventoryLocationId' => $inventoryLocation->id])
->andWhere(['not', ['elements.id' => null]])
->collect();

$inventoryItems = Plugin::getInstance()->getInventory()->getInventoryItemsByIds($levels->pluck('inventoryItemId')->unique()->toArray());
Expand Down

0 comments on commit 2476f81

Please sign in to comment.