Self hosted FLOSS fitness/workout, nutrition and weight tracker
Use all when calling update_or_create
Roland Geiderd18b628e2d1c
diff --git a/wger/exercises/sync.py b/wger/exercises/sync.pyindex b19bb597f..c9467f0fd 100644--- a/wger/exercises/sync.py+++ b/wger/exercises/sync.py@@ -82,7 +82,7 @@ def sync_exercises(muscles = [Muscle.objects.get(pk=i['id']) for i in data['muscles']]muscles_sec = [Muscle.objects.get(pk=i['id']) for i in data['muscles_secondary']]- base, base_created = ExerciseBase.objects.update_or_create(+ base, base_created = ExerciseBase.all.update_or_create(uuid=uuid,defaults={'category_id': category_id},)