2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

Same thing, but for the "part" display

This commit is contained in:
Oliver Walters 2022-03-26 17:40:02 +11:00
parent faf8e45138
commit 6c3b83c05b

View File

@ -86,7 +86,14 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
@override @override
Future<void> request(BuildContext context) async { Future<void> request(BuildContext context) async {
await part.reload();
final bool result = await part.reload();
if (!result || part.pk == -1) {
// Part could not be loaded, for some reason
Navigator.of(context).pop();
}
await part.getTestTemplates(); await part.getTestTemplates();
} }