Skip to content

Commit

Permalink
Avoid duplicating external-url configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyh authored and whatnick committed Jan 8, 2021
1 parent 5b77498 commit ee63dcb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cubedash/_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ def root():
title=product.name,
description=product.definition.get("description"),
rel="child",
href=url_for(
".collection", collection=product.name, _external=True
),
href=url_for(".collection", collection=product.name),
)
for product, product_summary in _model.get_products_with_summaries()
),
Expand Down Expand Up @@ -475,9 +473,7 @@ def _stac_collection(collection: str):
links=[
dict(
rel="items",
href=url_for(
".collection_items", collection=collection, _external=True
),
href=url_for(".collection_items", collection=collection),
)
],
)
Expand Down Expand Up @@ -523,7 +519,6 @@ def item(collection: str, dataset_id: str):
".item",
collection=actual_product_name,
dataset_id=dataset_id,
_external=True,
)
abort(
404,
Expand Down

0 comments on commit ee63dcb

Please sign in to comment.