mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-14 19:25:27 +00:00
Update API to match server changes (#196)
* Support updated API which changes detail of PartCategory list * Update version to 0.8.1
This commit is contained in:
@ -51,7 +51,9 @@ class InvenTreePartCategory extends InvenTreeModel {
|
||||
return p;
|
||||
}
|
||||
|
||||
int get partcount => (jsondata["parts"] ?? 0) as int;
|
||||
// Return the number of parts in this category
|
||||
// Note that the API changed from 'parts' to 'part_count' (v69)
|
||||
int get partcount => (jsondata["part_count"] ?? jsondata["parts"] ?? 0) as int;
|
||||
|
||||
@override
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||
|
Reference in New Issue
Block a user