Skip to content

Commit

Permalink
Fix unsupported operand type(s) for |: 'dict' and 'dict'
Browse files Browse the repository at this point in the history
  • Loading branch information
eleurent committed Jan 13, 2024
1 parent 2d30331 commit b72dbf0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/nature_go/observation/identification.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ def format_species(species):
}
}

result = {"results": list(map(format_species, bird_species))}
result["results"] = [res | {"score": 1 / len(result["results"])} for res in result["results"]]
return result
response = {'results': list(map(format_species, bird_species))}
for res in response['results']:
res['score'] = 1 / len(response['results'])
return response


def read_exif(image_path):
Expand Down

0 comments on commit b72dbf0

Please sign in to comment.