mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-31 13:25:40 +00:00 
			
		
		
		
	Fix typo
This commit is contained in:
		| @@ -77,32 +77,21 @@ class InvenTreeModel { | |||||||
|     if (subKey.isNotEmpty) { |     if (subKey.isNotEmpty) { | ||||||
|  |  | ||||||
|       if (!data.containsKey(subKey)) { |       if (!data.containsKey(subKey)) { | ||||||
|         sentryReportMessage( |  | ||||||
|           "getValue() called with invalid subKey", |  | ||||||
|           context: { |  | ||||||
|             "model": URL, |  | ||||||
|             "key": key, |  | ||||||
|             "subKey": subKey |  | ||||||
|           } |  | ||||||
|         ); |  | ||||||
|         debug("JSON data does not contain subKey '$subKey' for key '$key'"); |         debug("JSON data does not contain subKey '$subKey' for key '$key'"); | ||||||
|         return backup; |         return backup; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       data = (data[subKey] ?? {}) as Map<String, dynamic>; |       dynamic sub_data = data[subKey]; | ||||||
|  |  | ||||||
|  |       if (sub_data is Map<String, dynamic>) { | ||||||
|  |         data = (data[subKey] ?? {}) as Map<String, dynamic>; | ||||||
|  |       } | ||||||
|  |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (data.containsKey(key)) { |     if (data.containsKey(key)) { | ||||||
|       return data[key]; |       return data[key]; | ||||||
|     } else { |     } else { | ||||||
|         sentryReportMessage( |  | ||||||
|           "getValue() called with invalid key", |  | ||||||
|           context: { |  | ||||||
|             "model": URL, |  | ||||||
|             "key": key, |  | ||||||
|             "subKey": subKey |  | ||||||
|           } |  | ||||||
|         ); |  | ||||||
|       debug("JSON data does not contain key '$key' (subKey '${subKey}')"); |       debug("JSON data does not contain key '$key' (subKey '${subKey}')"); | ||||||
|       return backup; |       return backup; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -232,7 +232,7 @@ class InvenTreeStockItem extends InvenTreeModel { | |||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   int get status => getInt("staus"); |   int get status => getInt("status"); | ||||||
|    |    | ||||||
|   String get packaging => getString("packaging"); |   String get packaging => getString("packaging"); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user