Skip to content

Commit

Permalink
create single item only if no items or children in collection, lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lubojr committed Jul 25, 2024
1 parent 4f47fc8 commit 1026e81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/eodash_catalog/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def handle_xcube_endpoint(
def handle_GeoDB_endpoint(
catalog_config: dict, endpoint_config: dict, collection_config: dict, catalog: Catalog
) -> Collection:
# ID of collection is data["Name"] instead of CollectionId to be able to
# ID of collection is data["Name"] instead of CollectionId to be able to
# create more STAC collections from one geoDB table
collection = get_or_create_collection(
catalog, collection_config["Name"], collection_config, catalog_config, endpoint_config
Expand Down
2 changes: 1 addition & 1 deletion src/eodash_catalog/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class Options:

def add_single_item_if_collection_empty(collection: Collection) -> None:
for link in collection.links:
if link.rel == RelType.ITEM:
if link.rel in [RelType.CHILD, RelType.ITEM]:
break
else:
item = Item(
Expand Down

0 comments on commit 1026e81

Please sign in to comment.