Fix storage location breadcrumbs for shared locations [SCI-11103]

This commit is contained in:
Martin Artnik 2024-09-27 12:45:07 +02:00
parent a7e025736b
commit 2ce7c24df1

View file

@ -225,7 +225,7 @@ class StorageLocationsController < ApplicationController
storage_locations = []
if params[:parent_id] || @storage_location
location = (current_team.storage_locations.find_by(id: params[:parent_id]) || @storage_location)
location = StorageLocation.find_by(id: params[:parent_id]) || @storage_location
if location
storage_locations.unshift(breadcrumbs_item(location))
while location.parent