fix: store — deserialize recipe JSON columns in _row_to_dict
This commit is contained in:
parent
3c4f568b3e
commit
6a54204cfc
1 changed files with 4 additions and 1 deletions
|
|
@ -32,7 +32,10 @@ class Store:
|
|||
# Deserialise any TEXT columns that contain JSON
|
||||
for key in ("metadata", "nutrition_data", "source_data", "items",
|
||||
"metrics", "improvement_suggestions", "confidence_scores",
|
||||
"warnings"):
|
||||
"warnings",
|
||||
# recipe columns
|
||||
"ingredients", "ingredient_names", "directions",
|
||||
"keywords", "element_coverage"):
|
||||
if key in d and isinstance(d[key], str):
|
||||
try:
|
||||
d[key] = json.loads(d[key])
|
||||
|
|
|
|||
Loading…
Reference in a new issue