From 25a17e8871b2c6c8d4e38ab4e3531fa658662dc9 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 18 Feb 2015 14:10:35 +0100 Subject: [PATCH] Don't use frozenset to calculate the cache key --- wger/weight/helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wger/weight/helpers.py b/wger/weight/helpers.py index bcd972685..711c4ec3a 100644 --- a/wger/weight/helpers.py +++ b/wger/weight/helpers.py @@ -73,7 +73,10 @@ def group_log_entries(user, year, month, day=None): :return: a dictionary with grouped logs by date and exercise ''' - log_hash = hash(frozenset([user.pk, year, month, day])) + if day: + log_hash = hash((user.pk, year, month, day)) + else: + log_hash = hash((user.pk, year, month)) # There can be workout sessions without any associated log entries, so it is # not enough so simply iterate through the logs