diff --git a/.github/ISSUE_TEMPLATE/data-request.yml b/.github/ISSUE_TEMPLATE/data-request.yml index c441549b..a9a1c213 100644 --- a/.github/ISSUE_TEMPLATE/data-request.yml +++ b/.github/ISSUE_TEMPLATE/data-request.yml @@ -130,6 +130,14 @@ body: placeholder: OGC, WMS, WMTS, WCS, WCPS, API Coverages, API Processes, etc. validations: required: false + - type: input + id: thumbnails + attributes: + label: Thumbnails + description: Access thumbnails media of the dataset. + placeholder: OGC, WMS, WMTS, etc. + validations: + required: false - type: input id: access-control attributes: diff --git a/stac/stac-generator/stac-generator.py b/stac/stac-generator/stac-generator.py index acf2a8fd..498b9831 100644 --- a/stac/stac-generator/stac-generator.py +++ b/stac/stac-generator/stac-generator.py @@ -93,7 +93,7 @@ def create_assets(doc): if match is not None and match.span() == (0, len(api)): asset = pystac.Asset( roles=["data"], - href= match.group(0) + href=match.group(0) ) assets[f"data_{index + 1}"] = asset @@ -125,7 +125,10 @@ def create_stac_item(doc, title): properties["Data Source"] = doc["Data Source"] if "Thumbnails" in doc.keys(): - for index, thumbnail in enumerate(doc["Thumbnails"]): + thumbnails = doc["Thumbnails"] + if type(doc["Thumbnails"]) != list: + thumbnails = [doc["Thumbnails"]] + for index, thumbnail in enumerate(thumbnails): asset = pystac.Asset( roles=["thumbnail"], href=thumbnail,