mirror of
https://github.com/inventree/inventree-app.git
synced 2025-09-13 14:31:22 +00:00
bug fix: PO Lines (#685)
* bug fix: PO Lines - Correctly display part images for purchase order line items * Refactor * Code formatting
This commit is contained in:
@@ -732,6 +732,8 @@ class InvenTreeModel {
|
||||
|
||||
var response = await api.get(URL, params: params);
|
||||
|
||||
print("paginated: ${URL}: ${params}");
|
||||
|
||||
if (!response.isValid()) {
|
||||
return null;
|
||||
}
|
||||
|
@@ -114,7 +114,15 @@ class InvenTreeOrderLine extends InvenTreeModel {
|
||||
|
||||
String get partName => getString("name", subKey: "part_detail");
|
||||
|
||||
String get partImage => getString("thumbnail", subKey: "part_detail");
|
||||
String get partImage {
|
||||
String img = getString("thumbnail", subKey: "part_detail");
|
||||
|
||||
if (img.isEmpty) {
|
||||
img = getString("image", subKey: "part_detail");
|
||||
}
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
String get targetDate => getDateString("target_date");
|
||||
}
|
||||
|
Reference in New Issue
Block a user