Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelErsh committed Apr 3, 2024
1 parent a817131 commit 4421a6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion async_api/src/api/v1/films.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ async def search_films(
)
@cache(expire=settings.cache_ttl_seconds)
async def get_film_details(
film_id: FilmID, film_service: Annotated[BaseFilmService, Depends(ElasticsearchFilmService)]
film_id: FilmID,
film_service: Annotated[BaseFilmService, Depends(ElasticsearchFilmService)],
) -> Film:
film = await film_service.get_or_none(film_id)
if not film:
Expand Down
1 change: 1 addition & 0 deletions async_api/src/services/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async def get_or_none(self, person_id: PersonID) -> Person | None:
return Person.model_validate(doc["_source"])
except NotFoundError:
return None
return Person.model_validate(doc["_source"])

async def search(
self,
Expand Down

0 comments on commit 4421a6b

Please sign in to comment.