Skip to content

Commit

Permalink
Don't assume edges are present
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Nov 27, 2024
1 parent 7346925 commit 48e715b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bw2io/strategies/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ def drop_unlinked(db: List[dict]) -> List[dict]:
]
"""
for ds in db:
if not "exchanges" in ds:
continue
ds["exchanges"] = [obj for obj in ds["exchanges"] if obj.get("input")]
return db

Expand Down

0 comments on commit 48e715b

Please sign in to comment.