We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1176303 commit 67dc8ccCopy full SHA for 67dc8cc
satpy/dataset/id_keys.py
@@ -11,9 +11,11 @@ def get_keys_from_config(common_id_keys: dict, config: dict) -> dict:
11
"""Gather keys for a new DataID from the ones available in configured dataset."""
12
id_keys = {}
13
for key, val in common_id_keys.items():
14
- has_key = key in config
15
- is_required_or_default = val is not None and (val.get("required") is True or val.get("default") is not None)
16
- if has_key or is_required_or_default:
+ if key in config:
+ id_keys[key] = val
+ if val is None:
17
+ continue
18
+ if val.get("required") is True or val.get("default") is not None:
19
id_keys[key] = val
20
if not id_keys:
21
raise ValueError("Metadata does not contain enough information to create a DataID.")
0 commit comments