Self hosted FLOSS fitness/workout, nutrition and weight tracker
Expose and allow filtering of ingredient language throut the REST api
Roland Geider2f0d6de3619b
diff --git a/wger/nutrition/api/resources.py b/wger/nutrition/api/resources.pyindex e0c0628fa..08c31c7cf 100644--- a/wger/nutrition/api/resources.py+++ b/wger/nutrition/api/resources.py@@ -26,11 +26,14 @@ from wger.nutrition.models import NutritionPlanfrom wger.nutrition.models import Mealfrom wger.nutrition.models import MealItemfrom wger.utils.resources import UserObjectsOnlyAuthorization+from wger.core.api.resources import LicenseResource+from wger.core.api.resources import LanguageResourceclass IngredientResource(ModelResource):+ language = fields.ToOneField(LanguageResource, 'language')license = fields.ToOneField(LicenseResource, 'license')class Meta:@@ -48,6 +51,7 @@ class IngredientResource(ModelResource):'sodium': ALL,'status': ALL,'update_date': ALL,+ 'language': ALL,'license': ALL,'license_author': ALL}