mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-14 19:25:27 +00:00
Filter fix (#473)
* Add check for "null" top level locations and categories * Fix API - Top level location and category broken after API 174 - Ref: https://github.com/inventree/InvenTree/pull/6536
This commit is contained in:
@ -393,13 +393,22 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
|
||||
// Construct the "details" panel
|
||||
List<Widget> detailTiles() {
|
||||
|
||||
Map<String, String> filters = {};
|
||||
|
||||
int? parent = location?.pk;
|
||||
|
||||
if (parent != null) {
|
||||
filters["parent"] = parent.toString();
|
||||
} else if (api.supportsNullTopLevelFiltering) {
|
||||
filters["parent"] = "null";
|
||||
}
|
||||
|
||||
List<Widget> tiles = [
|
||||
locationDescriptionCard(),
|
||||
Expanded(
|
||||
child: PaginatedStockLocationList(
|
||||
{
|
||||
"parent": location?.pk.toString() ?? "null",
|
||||
},
|
||||
filters,
|
||||
title: L10().sublocations,
|
||||
),
|
||||
flex: 10,
|
||||
|
Reference in New Issue
Block a user