Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Don't use a string as a dictionary key

Roland Geiderb2cf08ba36a7
diff --git a/wger/manager/views/workout.py b/wger/manager/views/workout.py
index 1f86ded58..18f3156e8 100644
--- a/wger/manager/views/workout.py
+++ b/wger/manager/views/workout.py
@@ -250,7 +250,7 @@ class LastWeightHelper():
:param reps:
:return: WorkoutLog or '' if none is found
'''
- key = u'{0}-{1}-{2}'.format(self.user.pk, exercise.pk, reps)
+ key = (self.user.pk, exercise.pk, reps)
if self.last_weight_list.get(key) is None:
last_log = WorkoutLog.objects.filter(user=self.user,