Skip to content

Commit

Permalink
fixup! eliminate usage of deprecated CollectionMetadata.get_or_create
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Sep 15, 2023
1 parent 64e466a commit 54a43ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openeo_driver/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ class DriverDataCube:
"""Base class for "driver" side raster data cubes."""

def __init__(self, metadata: CollectionMetadata = None):
self.metadata = metadata or CollectionMetadata(metadata={})
self.metadata = (
metadata if isinstance(metadata, CollectionMetadata) else CollectionMetadata(metadata=metadata or {})
)

def __eq__(self, o: object) -> bool:
if o.__class__ == self.__class__:
Expand Down

0 comments on commit 54a43ec

Please sign in to comment.