Skip to content

Commit 027df5d

Browse files
committed
Fix out of order bug with inconsistent sorting application
1 parent 07cff56 commit 027df5d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bw2io/importers/base_lci.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,12 @@ def create_randonneur_excel_template_for_unlinked(
770770
if not filepath.suffix.lower() == ".xlsx":
771771
filepath = filepath.with_suffix(".xlsx")
772772

773+
source_fields, target_fields = sorted(source_fields), sorted(target_fields)
774+
773775
data = [
774776
{
775-
"source": {key: obj.get(key) for key in sorted(source_fields)},
776-
"target": {key: "" for key in sorted(target_fields)},
777+
"source": {key: obj.get(key) for key in source_fields},
778+
"target": {key: "" for key in target_fields},
777779
}
778780
for obj in self.unlinked
779781
if edge_filter(obj)

0 commit comments

Comments
 (0)