mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Cleanup for API error handling
Ref: https://stackoverflow.com/questions/54617432/looking-up-a-deactivated-widgets-ancestor-is-unsafe
This commit is contained in:
parent
90072904a0
commit
33bb6148de
11 changed files with 162 additions and 167 deletions
|
|
@ -97,7 +97,6 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
filters: {
|
||||
"part": "${partId}",
|
||||
},
|
||||
dialog: showDialog,
|
||||
).then((var templates) {
|
||||
testTemplates.clear();
|
||||
|
||||
|
|
@ -113,7 +112,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
|
||||
int get testResultCount => testResults.length;
|
||||
|
||||
Future<void> getTestResults(BuildContext context, {bool showDialog=false}) async {
|
||||
Future<void> getTestResults(BuildContext context) async {
|
||||
|
||||
await InvenTreeStockItemTestResult().list(
|
||||
context,
|
||||
|
|
@ -121,7 +120,6 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
"stock_item": "${pk}",
|
||||
"user_detail": "true",
|
||||
},
|
||||
dialog: showDialog,
|
||||
).then((var results) {
|
||||
testResults.clear();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue