Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #950 from CCI-Tools/alicja-949-str-is-not-list-bug
Browse files Browse the repository at this point in the history
fix of weirdo string is not a list issue (duh!) #949
  • Loading branch information
AliceBalfanz authored Sep 14, 2020
2 parents 04961e7 + 777a7e3 commit 4c446dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Added package `s3fs` to Python environment as it is required to open Zarr datasets
from S3-compatible object store. #940
* Fixed issue of harmonization of info field names of metadata (#949)

## Version 2.1.1

Expand Down
2 changes: 2 additions & 0 deletions cate/ds/esa_cci_odp.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ def _harmonize_info_field_names(catalogue: dict, single_field_name: str, multipl
else:
if catalogue[single_field_name] not in catalogue[multiple_fields_name] \
and (multiple_items_name is None or catalogue[single_field_name] != multiple_items_name):
if not isinstance(catalogue[multiple_fields_name], list):
catalogue[multiple_fields_name] = [catalogue[multiple_fields_name]]
catalogue[multiple_fields_name].append(catalogue[single_field_name])
catalogue.pop(single_field_name)

Expand Down
2 changes: 1 addition & 1 deletion tests/ds/test_esa_cci_odp.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def test_make_local_wo_subsets(self):
local_data_store.remove_data_source(f"local.{random_string}")


@unittest.skip(reason='Used for debugging issue with duplicate dsr_ids')
@unittest.skip(reason='Used for debugging issue with duplicate dsr_ids and weirdo bug #949')
class NoDuplicatesTest(unittest.TestCase):
def test_for_duplicates_in_drs_ids(self):
data_store = EsaCciOdpDataStore()
Expand Down

0 comments on commit 4c446dd

Please sign in to comment.