Skip to content

Commit

Permalink
Check that item_assets is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
inigo-cobian committed Jan 13, 2025
1 parent 559acdc commit 823e9ab
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public static JSONObject readAssetsFromCollection(String collectionUrl, JSONObje
// item_assets is a shortcut for obtaining information about the assets
// https://github.com/stac-extensions/item-assets
if (collection.has("item_assets")) {
return STACCollectionParser.readItemAssets(collection);
if (!collection.getJSONObject("item_assets").isEmpty()) {
return STACCollectionParser.readItemAssets(collection);
}
}

// TODO Move the query to another place.
Expand Down

0 comments on commit 823e9ab

Please sign in to comment.