EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 367f38e1 authored by Bernhard Mallinger's avatar Bernhard Mallinger
Browse files

Fix product type filtering

Previously, it returned too early
parent 1c69e2f0
No related branches found
No related tags found
1 merge request!3Fix product type filtering
......@@ -276,6 +276,7 @@ class EOxServerBackend(ItemBackend):
storage = self._get_storage_from_source(source, item)
product_type_found = False
# match self.product_types with item
for product_type in self.product_types:
match = []
......@@ -292,12 +293,14 @@ class EOxServerBackend(ItemBackend):
match.append(False)
if all(match):
product_type = product_type
product_type_found = True
break
else:
raise RegistrationError(f"{item} not matched to any product_type")
else:
break
if not product_type_found:
raise RegistrationError(f"{item} not matched to any product_type")
logger.info(f"Registering into EOxServer for type " f'"{product_type["name"]}"')
product = self._register_with_stac(source, item, replace, storage, product_type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment