Skip to content

Commit

Permalink
Change results to raw_results to satisfy mypy.
Browse files Browse the repository at this point in the history
  • Loading branch information
JPBergsma committed Nov 30, 2022
1 parent 1e49fb8 commit 0a551aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions optimade/server/entry_collections/entry_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def find(

exclude_fields = self.all_fields - response_fields

results = [self.resource_mapper.map_back(doc) for doc in raw_results]
self.check_and_add_missing_fields(results, response_fields)
raw_results = [self.resource_mapper.map_back(doc) for doc in raw_results]
self.check_and_add_missing_fields(raw_results, response_fields)

if results:
results = self.resource_mapper.deserialize(results)
if raw_results:
results = self.resource_mapper.deserialize(raw_results)

if single_entry:
results = results[0] if results else None # type: ignore[assignment]
Expand Down

0 comments on commit 0a551aa

Please sign in to comment.