Skip to content

Commit 217795c

Browse files
committed
update STAC API
1 parent 383a015 commit 217795c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pycsw/stac/api.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,8 @@ def collections(self, headers_, args):
262262
query_args.append("typename = 'stac:Collection'")
263263
ast = parse_ecql(' AND '.join(query_args))
264264
LOGGER.debug(f'Abstract syntax tree: {ast}')
265-
filters = to_filter(ast, self.repository.dbtype, self.repository.query_mappings)
266-
LOGGER.debug(f'Filter: {filters}')
267-
sc_query = self.repository.session.query(
268-
self.repository.dataset).filter(filters).limit(limit).all()
265+
266+
_, sc_query = self.repository.query(ast=ast, maxrecords=limit)
269267

270268
for sc in sc_query:
271269
id_found = False
@@ -549,7 +547,7 @@ def manage_collection_item(self, headers_, action='create', item=None, data=None
549547
if collection is not None:
550548
data['collection'] = collection
551549
if data is not None and 'id' in data:
552-
item=data['id']
550+
item = data['id']
553551

554552
return super().manage_collection_item(
555553
headers_=headers_, action=action, item=item, data=data)

0 commit comments

Comments
 (0)