Skip to content

Commit

Permalink
remove return
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelErsh committed Apr 4, 2024
1 parent 77c2ad8 commit d59bb53
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion async_api/src/services/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def __init__(self, elastic: Annotated[AsyncElasticsearch, Depends(get_elasticsea
async def get_or_none(self, person_id: PersonID) -> Person | None:
try:
doc = await self.elastic.get(index=settings.es_persons_index, id=str(person_id))
return Person.model_validate(doc["_source"])
except NotFoundError:
return None
return Person.model_validate(doc["_source"])
Expand Down

0 comments on commit d59bb53

Please sign in to comment.