Self hosted FLOSS fitness/workout, nutrition and weight tracker
Correctly save the translation comments
Roland Geidera099ec2bb350
diff --git a/wger/exercises/sync.py b/wger/exercises/sync.pyindex 1e2377d93..b40629834 100644--- a/wger/exercises/sync.py+++ b/wger/exercises/sync.py@@ -115,7 +115,10 @@ def sync_exercises(print_fn(out)for note in translation_data['notes']:- ExerciseComment.objects.get_or_create(exercise=translation, comment=note)+ ExerciseComment.objects.get_or_create(+ exercise=translation,+ comment=note['comment'],+ )for alias in translation_data['aliases']:Alias.objects.get_or_create(exercise=translation, alias=alias)diff --git a/wger/exercises/tests/test_sync.py b/wger/exercises/tests/test_sync.pyindex 001034fae..a87f9cada 100644--- a/wger/exercises/tests/test_sync.py+++ b/wger/exercises/tests/test_sync.py@@ -380,7 +380,11 @@ class MockExerciseResponse:"Kettlebell mit zwei Händen"],"notes": [- "Wichtig die Übung richtig zu machen"+ {+ "id": 1,+ "exercise": 100,+ "comment": "Wichtig die Übung richtig zu machen"+ },],"license": 2,"license_author": "Tester von der Testen",@@ -477,7 +481,11 @@ class MockExerciseResponse:"yet another name"],"notes": [- "Foobar",+ {+ "id": 147,+ "exercise": 123,+ "comment": "Foobar"+ },],"license": 2,"license_author": "Mr X",