Skip to content

Commit

Permalink
fix: check assets length for driver criteria (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato authored Dec 15, 2023
1 parent b4735ff commit 3b4a0f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eodag_cube/api/product/drivers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

DRIVERS = [
{
"criteria": [lambda prod: True if hasattr(prod, "assets") else False],
"criteria": [
lambda prod: True if len(getattr(prod, "assets", {})) > 0 else False
],
"driver": StacAssets(),
},
{
Expand Down

0 comments on commit 3b4a0f8

Please sign in to comment.