Self hosted FLOSS fitness/workout, nutrition and weight tracker
Correctly access the value of the ingredient source enum
Roland Geiderb37752239f08
diff --git a/wger/nutrition/models/ingredient.py b/wger/nutrition/models/ingredient.pyindex a1a658df8..fedaedcfa 100644--- a/wger/nutrition/models/ingredient.py+++ b/wger/nutrition/models/ingredient.py@@ -443,7 +443,7 @@ class Ingredient(AbstractSubmissionModel, AbstractLicenseModel, models.Model):@propertydef off_link(self):- if self.source_name == Source.OPEN_FOOD_FACTS:+ if self.source_name == Source.OPEN_FOOD_FACTS.value:return f'https://world.openfoodfacts.org/product/{self.code}/'def get_image(self, request: HttpRequest):