Skip to content

Commit

Permalink
make sure URL is a String (#607)
Browse files Browse the repository at this point in the history
* make sure URL is a String

* also fix in tms

* update changelog
  • Loading branch information
vincentsarago authored Mar 14, 2023
1 parent 4975fc3 commit 3fb082b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Release Notes

## Next (TBD)
## 0.11.3 (2023-03-14)

* handle dateline crossing dataset in COG/STAC Viewer
* update Factories `url_for` method to make sure we return a string (https://github.com/developmentseed/titiler/pull/607)

## 0.11.2 (2023-03-08)

Expand Down
6 changes: 3 additions & 3 deletions src/titiler/core/titiler/core/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ def url_for(self, request: Request, name: str, **path_params: Any) -> str:
)
base_url += prefix

url = url_path.make_absolute_url(base_url=base_url)
return url
return str(url_path.make_absolute_url(base_url=base_url))

def add_route_dependencies(
self,
Expand Down Expand Up @@ -1519,7 +1518,8 @@ def url_for(self, request: Request, name: str, **path_params: Any) -> str:
base_url = str(request.base_url)
if self.router_prefix:
base_url += self.router_prefix.lstrip("/")
return url_path.make_absolute_url(base_url=base_url)

return str(url_path.make_absolute_url(base_url=base_url))

def register_routes(self):
"""Register TMS endpoint routes."""
Expand Down

0 comments on commit 3fb082b

Please sign in to comment.