Use the new API notation for external URL ('link')

This commit is contained in:
Oliver Walters committed 2020-04-05 19:19:44 +10:00
1 parent fbd52e1414
commit 65d955bcc6
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -45,7 +45,8 @@ class InvenTreeModel {
int get parentId => jsondata['parent'] ?? -1;
String get link => jsondata['URL'] ?? '';
// Legacy API provided external link as "URL", while newer API uses "link"
String get link => jsondata['link'] ?? jsondata['URL'] ?? '';
// Create a new object from JSON data (not a constructor!)
InvenTreeModel createFromJson(Map<String, dynamic> json) {