Tweaked QuerySetMapper to return the value's value, in line with the changes to flexi...
[philo.git] / models / fields.py
index 0c31026..74a0525 100644 (file)
@@ -129,7 +129,7 @@ class JSONAttribute(AttributeField):
        
        def value_from_object(self, obj):
                try:
-                       return getattr(obj, self.attname).value
+                       return getattr(obj, self.attname)
                except AttributeError:
                        return None
        
@@ -158,7 +158,7 @@ class ForeignKeyAttribute(AttributeField):
        
        def value_from_object(self, obj):
                try:
-                       relobj = super(ForeignKeyAttribute, self).value_from_object(obj).value
+                       relobj = super(ForeignKeyAttribute, self).value_from_object(obj)
                except AttributeError:
                        return None
                return getattr(relobj, 'pk', None)