Skip to content

Commit

Permalink
Merge pull request #1605 from wger-project/dependabot/pip/openfoodfac…
Browse files Browse the repository at this point in the history
…ts-0.2.0

Bump openfoodfacts from 0.1.12 to 0.2.0
  • Loading branch information
rolandgeider committed Mar 21, 2024
2 parents c045e75 + 63f66f9 commit 788fa9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -25,7 +25,7 @@ flower==2.0.1
fontawesomefree~=6.5.1
icalendar==5.0.11
invoke==2.2.0
openfoodfacts==0.1.12
openfoodfacts==0.2.0
pillow==10.2.0
reportlab==4.1.0
requests==2.31.0
Expand Down
4 changes: 2 additions & 2 deletions wger/nutrition/models/ingredient.py
Expand Up @@ -58,6 +58,7 @@
TWOPLACES,
)
from wger.utils.language import load_language
from wger.utils.requests import wger_user_agent
from wger.utils.managers import SubmissionManager
from wger.utils.models import (
AbstractLicenseModel,
Expand All @@ -67,7 +68,6 @@
# Local
from .ingredient_category import IngredientCategory


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -467,7 +467,7 @@ def fetch_ingredient_from_off(cls, code: str):

logger.info(f'Searching for ingredient {code} in OFF')
try:
api = API()
api = API(user_agent=wger_user_agent())
result = api.product.get(code)
except JSONDecodeError as e:
logger.info(f'Got JSONDecodeError from OFF: {e}')
Expand Down

0 comments on commit 788fa9c

Please sign in to comment.