2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-17 04:35:26 +00:00

Action to count stock items now works

This commit is contained in:
Oliver Walters
2020-04-09 23:41:16 +10:00
parent 80f7694abb
commit f5b8311428
2 changed files with 96 additions and 24 deletions

View File

@ -83,20 +83,22 @@ class InvenTreeModel {
/*
* Reload this object, by requesting data from the server
*/
void reload() async {
Future<bool> reload() async {
print("Reloading data from $url");
var response = await api.get(url);
var response = await api.get(url, params: defaultGetFilters());
if (response.statusCode != 200) {
print("Error retrieving data");
return;
return false;
}
final Map<String, dynamic> data = json.decode(response.body);
jsondata = data;
return true;
}
// Return the detail view for the associated pk