Skip to content

Commit

Permalink
Skip item-properties import for non-Darwin JSON formats (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWilkie authored Oct 11, 2024
1 parent f90c6ac commit 0bb7e13
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions darwin/importer/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,11 @@ def _normalize_item_properties(
return item_properties

normalized_properties = defaultdict(lambda: {"property_values": []})
for item_prop in item_properties:
name = item_prop["name"]
value = item_prop["value"]
normalized_properties[name]["property_values"].append({"value": value})
if item_properties:
for item_prop in item_properties:
name = item_prop["name"]
value = item_prop["value"]
normalized_properties[name]["property_values"].append({"value": value})

return normalized_properties

Expand Down

0 comments on commit 0bb7e13

Please sign in to comment.