Spaces:
Paused
Paused
Commit
•
8d827d2
1
Parent(s):
73fda7b
fixed bug with wrapping in dictionary data
Browse files
algo.py
CHANGED
@@ -245,10 +245,10 @@ class Algo:
|
|
245 |
dictionary_result = get_dictionary_data_from_db(self.db_cursor, mapping['dictionary_word'])
|
246 |
|
247 |
mapping.update({
|
248 |
-
'wweia_category': dictionary_result['wweia_category'],
|
249 |
-
'water_content': dictionary_result['water_content'],
|
250 |
-
'dry_matter_content': dictionary_result['dry_matter_content'],
|
251 |
-
'leakage': dictionary_result['leakage']
|
252 |
})
|
253 |
|
254 |
return mapping
|
|
|
245 |
dictionary_result = get_dictionary_data_from_db(self.db_cursor, mapping['dictionary_word'])
|
246 |
|
247 |
mapping.update({
|
248 |
+
'wweia_category': dictionary_result['wweia_category'] if dictionary_result else None,
|
249 |
+
'water_content': dictionary_result['water_content'] if dictionary_result else None,
|
250 |
+
'dry_matter_content': dictionary_result['dry_matter_content'] if dictionary_result else None,
|
251 |
+
'leakage': dictionary_result['leakage'] if dictionary_result else None
|
252 |
})
|
253 |
|
254 |
return mapping
|