mirror of
https://github.com/inventree/inventree-app.git
synced 2025-05-06 01:08:53 +00:00
Similar checks for other widgets
This commit is contained in:
parent
6d3ca0fa3d
commit
8ba4a9e678
@ -89,7 +89,11 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
|
||||
// Update the category
|
||||
if (category != null) {
|
||||
await category!.reload();
|
||||
final bool result = await category?.reload() ?? false;
|
||||
|
||||
if (!result) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
}
|
||||
|
||||
// Request a list of sub-categories under this one
|
||||
|
@ -119,7 +119,11 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
|
||||
|
||||
// Reload location information
|
||||
if (location != null) {
|
||||
await location?.reload();
|
||||
final bool result = await location?.reload() ?? false;
|
||||
|
||||
if (!result) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
}
|
||||
|
||||
// Request a list of sub-locations under this one
|
||||
|
Loading…
x
Reference in New Issue
Block a user