From 3e8b743697d6532a7539486cbe772036638a751e Mon Sep 17 00:00:00 2001 From: "Charalampos (cham)" <64330098+charalamm@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:40:41 +0200 Subject: [PATCH] Fix getting matched count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix errors "unsupported operand type…-: 'NoneType' and 'int'" at /collections --- tipgstac/dependencies.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tipgstac/dependencies.py b/tipgstac/dependencies.py index 861bd63..60c018d 100644 --- a/tipgstac/dependencies.py +++ b/tipgstac/dependencies.py @@ -161,6 +161,8 @@ async def CollectionsParams( # noqa: C901 matched = None if context := results.get("context"): matched = context.get("matched") + else: + matched = results.get("numberMatched") for collection in results.get("collections", []): collections.append(