Skip to content

Commit

Permalink
Fixed Copy of NutritionPlan
Browse files Browse the repository at this point in the history
  • Loading branch information
JayanthBontha committed Oct 12, 2023
1 parent 2756364 commit c2316cf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions wger/nutrition/views/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ def copy(request, pk):
"""
Copy the nutrition plan
"""
logger.debug(request.user)
plan = get_object_or_404(NutritionPlan, pk=pk, user=request.user)

# Copy plan
Expand All @@ -211,7 +210,6 @@ def copy(request, pk):
plan_copy = plan
plan_copy.pk = None
plan_copy.save()

# Copy the meals
for meal in meals:
meal_items = meal.mealitem_set.select_related()
Expand Down

0 comments on commit c2316cf

Please sign in to comment.