Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Filter by current user

Roland Geider14843da2ded8
diff --git a/wger/nutrition/api/views.py b/wger/nutrition/api/views.py
index a7f6a0c26..5d0234220 100644
--- a/wger/nutrition/api/views.py
+++ b/wger/nutrition/api/views.py
@@ -211,7 +211,7 @@ class NutritionPlanViewSet(viewsets.ModelViewSet):
year = request.GET.get('year', today.year)
month = request.GET.get('month', today.month)
day = request.GET.get('day', today.day)
- plan = get_object_or_404(NutritionPlan, pk=pk)
+ plan = get_object_or_404(NutritionPlan, pk=pk, user=request.user)
try:
date = datetime.date(year=int(year), month=int(month), day=int(day))