Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix RemovedInDjango20Warning for many-to-many set

Scott Peshak745c1c9960c9
diff --git a/wger/manager/views/workout.py b/wger/manager/views/workout.py
index 11d14010b..081dd1e23 100644
--- a/wger/manager/views/workout.py
+++ b/wger/manager/views/workout.py
@@ -191,7 +191,7 @@ def copy_workout(request, pk):
current_set_copy.save()
# Exercises has Many2Many relationship
- current_set_copy.exercises = exercises
+ current_set_copy.exercises.set(exercises)
# Go through the exercises
for exercise in exercises: