Skip to content

Commit

Permalink
Fix: Bug when access collection item id directly #140
Browse files Browse the repository at this point in the history
  • Loading branch information
mzaglia committed Jan 27, 2021
1 parent 80b870a commit 110048a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bdc_stac/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,15 @@ def get_collection_items(

if ids is not None:
where += [Item.name.in_(ids.split(","))]
elif item_id is not None:
where += [Item.name.like(item_id)]
else:
if collections is not None:
where += [func.concat(Collection.name, "-", Collection.version).in_(collections.split(","))]
elif collection_id is not None:
where += [func.concat(Collection.name, "-", Collection.version) == collection_id]

if item_id is not None:
where += [Item.name.like(item_id)]

if query:
filters = create_query_filter(query)
if filters:
Expand Down

0 comments on commit 110048a

Please sign in to comment.