From 0c071916604272b743287009d93c6729c6ae1560 Mon Sep 17 00:00:00 2001 From: Marnanel Thurman Date: Sun, 19 Aug 2018 16:56:18 +0100 Subject: [PATCH] it's the instance that has the data, not the class --- django_kepi/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django_kepi/models.py b/django_kepi/models.py index d1fadc6..8369701 100644 --- a/django_kepi/models.py +++ b/django_kepi/models.py @@ -37,8 +37,8 @@ class Cobject(models.Model): if method_name==None: method_name = field - if hasattr(self.__class__, method_name): - method = getattr(self.__class__, method_name) + if hasattr(self, method_name): + method = getattr(self, method_name) if callable(method): result[field] = str(method())