diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index 678fa83e..889ed4d4 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -415,7 +415,13 @@ class InvenTreeStockItem extends InvenTreeModel { if (locationId == -1 || !jsondata.containsKey('location_detail')) return L10().locationNotSet; - return jsondata['location_detail']['pathstring'] ?? ''; + String _loc = jsondata['location_detail']['pathstring'] ?? ''; + + if (_loc.isNotEmpty) { + return _loc; + } else { + return locationName; + } } String get displayQuantity { diff --git a/lib/widget/location_display.dart b/lib/widget/location_display.dart index ae8d1692..a6313382 100644 --- a/lib/widget/location_display.dart +++ b/lib/widget/location_display.dart @@ -517,7 +517,7 @@ class _PaginatedStockListState extends State { Widget _buildItem(BuildContext context, InvenTreeStockItem item) { return ListTile( title: Text("${item.partName}"), - subtitle: Text("${item.partDescription}"), + subtitle: Text("${item.locationPathString}"), leading: InvenTreeAPI().getImage( item.partThumbnail, width: 40,