Skip to content

Commit

Permalink
add to NOAA-OWP#257. fix field name reference
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Feb 10, 2023
1 parent 998f191 commit d63b9cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ def reload(self, reload_from: str, serialized_item: Optional[str] = None) -> Dat
response_obj.release_conn()

# If we can safely infer it, make sure the "type" key is set in cases when it is missing
if len(self.supported_dataset_types) == 1 and Dataset._KEY_TYPE not in response_data:
response_data[Dataset._KEY_TYPE] = list(self.supported_dataset_types)[0].name
if len(self.supported_dataset_types) == 1 and "type" not in response_data:
response_data["type"] = list(self.supported_dataset_types)[0].name

dataset = Dataset.factory_init_from_deserialized_json(response_data)
dataset.manager = self
Expand Down

0 comments on commit d63b9cf

Please sign in to comment.