mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
null fix
This commit is contained in:
parent
a62b038faf
commit
4339f70d64
2 changed files with 7 additions and 3 deletions
|
|
@ -110,7 +110,9 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||||
int pk = category?.pk ?? -1;
|
int pk = category?.pk ?? -1;
|
||||||
|
|
||||||
// Update the category
|
// Update the category
|
||||||
|
if (category != null) {
|
||||||
await category.reload(context);
|
await category.reload(context);
|
||||||
|
}
|
||||||
|
|
||||||
// Request a list of sub-categories under this one
|
// Request a list of sub-categories under this one
|
||||||
await InvenTreePartCategory().list(context, filters: {"parent": "$pk"}).then((var cats) {
|
await InvenTreePartCategory().list(context, filters: {"parent": "$pk"}).then((var cats) {
|
||||||
|
|
@ -317,7 +319,7 @@ class PartList extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text("${part.name}"),
|
title: Text(part.fullname),
|
||||||
subtitle: Text("${part.description}"),
|
subtitle: Text("${part.description}"),
|
||||||
trailing: Text("${part.inStockString}"),
|
trailing: Text("${part.inStockString}"),
|
||||||
leading: InvenTreeAPI().getImage(
|
leading: InvenTreeAPI().getImage(
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,9 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||||
int pk = location?.pk ?? -1;
|
int pk = location?.pk ?? -1;
|
||||||
|
|
||||||
// Reload location information
|
// Reload location information
|
||||||
|
if (location != null) {
|
||||||
await location.reload(context);
|
await location.reload(context);
|
||||||
|
}
|
||||||
|
|
||||||
// Request a list of sub-locations under this one
|
// Request a list of sub-locations under this one
|
||||||
await InvenTreeStockLocation().list(context, filters: {"parent": "$pk"}).then((var locs) {
|
await InvenTreeStockLocation().list(context, filters: {"parent": "$pk"}).then((var locs) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue