Skip to content

Commit

Permalink
fix: fix api.py code
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Aug 9, 2023
1 parent 633add8 commit 27a9140
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openfoodfacts/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ def __init__(
to Environment.org
"""
if not isinstance(country, Country):
country = Country.get_from_2_letter_code(country)
country = Country[country]

self.api_config = APIConfig(
country=country, # type: ignore
country=country,
flavor=Flavor[flavor],
version=APIVersion[version],
environment=Environment[environment],
Expand Down

0 comments on commit 27a9140

Please sign in to comment.