mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Catch POST response which does not return 201
This commit is contained in:
parent
16f4f7195c
commit
d53773d95c
3 changed files with 34 additions and 16 deletions
|
|
@ -88,7 +88,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
|
||||
// Get all the test templates associated with this StockItem
|
||||
Future<void> getTestTemplates(BuildContext context, {bool showDialog=false}) async {
|
||||
InvenTreePartTestTemplate().list(
|
||||
await InvenTreePartTestTemplate().list(
|
||||
context,
|
||||
filters: {
|
||||
"part": "${partId}",
|
||||
|
|
@ -110,7 +110,8 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
int get testResultCount => testResults.length;
|
||||
|
||||
Future<void> getTestResults(BuildContext context, {bool showDialog=false}) async {
|
||||
InvenTreeStockItemTestResult().list(
|
||||
|
||||
await InvenTreeStockItemTestResult().list(
|
||||
context,
|
||||
filters: {
|
||||
"stock_item": "${pk}",
|
||||
|
|
@ -144,7 +145,6 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
data["notes"] = notes;
|
||||
}
|
||||
|
||||
|
||||
bool _result = false;
|
||||
|
||||
await InvenTreeStockItemTestResult().create(context, data).then((InvenTreeModel model) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue