app/soc/models/base.py
changeset 2767 4011d44ba0b6
parent 2074 5c75312566d5
child 2985 f1ed0ecd0128
--- a/app/soc/models/base.py	Wed Aug 12 15:44:18 2009 -0700
+++ b/app/soc/models/base.py	Thu Aug 13 10:23:31 2009 -0700
@@ -22,6 +22,7 @@
 
 __authors__ = [
   '"Todd Larsen" <tlarsen@google.com>',
+  '"Lennard de Rijk" <ljvderijk@gmail.com>',
 ]
 
 
@@ -68,12 +69,12 @@
       if not hasattr(self, key):
         continue
 
-      result[key] = getattr(self, key)
+      value = getattr(self, key)
 
-    if hasattr(self, 'name'):
-      name_prop = getattr(self, 'name')
-      if callable(name_prop):
-        result['name'] = name_prop()
+      if callable(value):
+        value = value()
+
+      result[key] = value
 
     return result