Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

remove debug line + fix add a muscle as primary and secondary

aloisce5c0e9cc926
diff --git a/wger/manager/models.py b/wger/manager/models.py
index c30a3fda0..d758bcf70 100644
--- a/wger/manager/models.py
+++ b/wger/manager/models.py
@@ -149,7 +149,6 @@ class Workout(models.Model):
'frontsecondary': muscles_front_secondary,
'backsecondary': muscles_back_secondary},
'day_list': day_canonical_repr}
- print(workout_canonical_form)
# Save to cache
cache.set(cache_mapper.get_workout_canonical(self.pk), workout_canonical_form)
diff --git a/wger/manager/views/workout.py b/wger/manager/views/workout.py
index 5cc14cfcb..77b0359e2 100644
--- a/wger/manager/views/workout.py
+++ b/wger/manager/views/workout.py
@@ -94,10 +94,10 @@ def view(request, pk):
muscles_back.append('images/muscles/main/muscle-{0}.svg'.format(i))
for i in canonical['muscles']['frontsecondary']:
- if i not in muscles_front:
+ if i not in muscles_front and i not in canonical['muscles']['front']:
muscles_front.append('images/muscles/secondary/muscle-{0}.svg'.format(i))
for i in canonical['muscles']['backsecondary']:
- if i not in muscles_back:
+ if i not in muscles_back and i not in canonical['muscles']['back']:
muscles_back.append('images/muscles/secondary/muscle-{0}.svg'.format(i))
# Append the silhouette of the human body as the last entry so the browser