Don't use frozenset to calculate the cache key

This commit is contained in:
Roland Geider
2015-02-18 14:10:35 +01:00
parent 2019f69179
commit 25a17e8871

View File

@@ -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