Commit 2a677f27 by Őry Máté

common: support properties in compute_cached

parent c165f85a
......@@ -222,7 +222,10 @@ def compute_cached(method, instance, memcached_seconds,
model, id = instance
instance = model.objects.get(id=id)
try:
method = getattr(instance, method)._original
method = getattr(model, method)
if hasattr(method, 'fget'):
method = method.fget
method = method._original
except AttributeError:
logger.exception("Couldnt get original method of %s.%s",
unicode(instance), method.__name__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment