Self hosted FLOSS fitness/workout, nutrition and weight tracker
Simplify expression
Roland Geidercdb958951c87
diff --git a/wger/utils/cache.py b/wger/utils/cache.pyindex 700fd7398..1c85cf247 100644--- a/wger/utils/cache.py+++ b/wger/utils/cache.py@@ -64,12 +64,7 @@ class CacheKeyMapper(object):"""Small helper function that returns the PK for the given parameter"""- try:- pk = param.pk- except AttributeError:- pk = param-- return pk+ return param.pk if hasattr(param, 'pk') else paramdef get_language_key(self, param):"""