Skip to content

Commit

Permalink
pass through StacBaseModel
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-maschler committed Feb 12, 2024
1 parent 1fa87b7 commit 653f3a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stac_fastapi/api/stac_fastapi/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from fastapi import Depends, params
from fastapi.dependencies.utils import get_parameterless_sub_dependant
from pydantic import BaseModel
from stac_pydantic.api import LandingPage
from stac_pydantic.shared import StacBaseModel
from starlette.concurrency import run_in_threadpool
from starlette.requests import Request
from starlette.responses import JSONResponse, Response
Expand All @@ -20,7 +20,7 @@
def _wrap_response(resp: Any, response_class: Type[Response]) -> Response:
if isinstance(resp, Response):
return resp
elif isinstance(resp, LandingPage):
elif isinstance(resp, StacBaseModel):
return resp
elif resp is not None:
return response_class(resp)
Expand Down

0 comments on commit 653f3a6

Please sign in to comment.