Skip to content

Commit 80cf595

Browse files
committed
FIX: Fix crash of _reorder_loaded_bands_like_input with indices and associated_bands
1 parent 3c753e2 commit 80cf595

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 0.22.3 (2025-mm-dd)
4+
5+
- FIX: Fix crash of _`reorder_loaded_bands_like_input` with indices and associated_bands
6+
37
## 0.22.2 (2025-04-18)
48

59
- FIX: Fix GPT graphs (mutiple errors, such a lonely `Subset`, a `LinearToFromdB` step not written, etc.)

eoreader/products/optical/s2_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ def _reorder_loaded_bands_like_input(
835835
)
836836

837837
for band in bands:
838-
if associated_bands:
838+
if associated_bands and band in associated_bands:
839839
for associated_band in associated_bands[band]:
840840
key = self._get_band_key(band, associated_band, **kwargs)
841841
reordered_dict[key] = bands_dict[key]

eoreader/products/optical/s2_theia_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def _reorder_loaded_bands_like_input(
521521
)
522522

523523
for band in bands:
524-
if associated_bands:
524+
if associated_bands and band in associated_bands:
525525
for associated_band in associated_bands[band]:
526526
key = self._get_band_key(band, associated_band, **kwargs)
527527
reordered_dict[key] = bands_dict[key]

0 commit comments

Comments
 (0)