From 027df5dc7a5aebf1ec04b035def36c420984cff0 Mon Sep 17 00:00:00 2001 From: Chris Mutel Date: Wed, 4 Sep 2024 15:29:28 +0200 Subject: [PATCH] Fix out of order bug with inconsistent sorting application --- bw2io/importers/base_lci.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bw2io/importers/base_lci.py b/bw2io/importers/base_lci.py index fb45b1a..187a8a9 100644 --- a/bw2io/importers/base_lci.py +++ b/bw2io/importers/base_lci.py @@ -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)