git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial node_middleware commit. Implements an attribute on the HttpRequest class...
[philo.git]
/
models
/
fields.py
diff --git
a/models/fields.py
b/models/fields.py
index
0c31026
..
74a0525
100644
(file)
--- a/
models/fields.py
+++ b/
models/fields.py
@@
-129,7
+129,7
@@
class JSONAttribute(AttributeField):
def value_from_object(self, obj):
try:
def value_from_object(self, obj):
try:
- return getattr(obj, self.attname)
.value
+ return getattr(obj, self.attname)
except AttributeError:
return None
except AttributeError:
return None
@@
-158,7
+158,7
@@
class ForeignKeyAttribute(AttributeField):
def value_from_object(self, obj):
try:
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)
except AttributeError:
return None
return getattr(relobj, 'pk', None)