Skip to content

Commit

Permalink
Fix out of order bug with inconsistent sorting application
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Sep 4, 2024
1 parent 07cff56 commit 027df5d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bw2io/importers/base_lci.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,12 @@ def create_randonneur_excel_template_for_unlinked(
if not filepath.suffix.lower() == ".xlsx":
filepath = filepath.with_suffix(".xlsx")

source_fields, target_fields = sorted(source_fields), sorted(target_fields)

data = [
{
"source": {key: obj.get(key) for key in sorted(source_fields)},
"target": {key: "" for key in sorted(target_fields)},
"source": {key: obj.get(key) for key in source_fields},
"target": {key: "" for key in target_fields},
}
for obj in self.unlinked
if edge_filter(obj)
Expand Down

0 comments on commit 027df5d

Please sign in to comment.