git.ithinksw.org
/
philo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8cc050
)
Tweaked Entity and TreeEntity to pass an actual queryset to QuerySetMapper instead...
author
Stephen Burrows
<stephen.r.burrows@gmail.com>
Fri, 29 Oct 2010 21:03:14 +0000
(17:03 -0400)
committer
Stephen Burrows
<stephen.r.burrows@gmail.com>
Fri, 29 Oct 2010 21:03:18 +0000
(17:03 -0400)
models/base.py
patch
|
blob
|
history
diff --git
a/models/base.py
b/models/base.py
index
0077250
..
1b6e60f
100644
(file)
--- a/
models/base.py
+++ b/
models/base.py
@@
-234,7
+234,7
@@
class Entity(models.Model):
@property
def attributes(self):
- return QuerySetMapper(self.attribute_set)
+ return QuerySetMapper(self.attribute_set
.all()
)
@property
def _added_attribute_registry(self):
@@
-344,7
+344,7
@@
class TreeEntity(Entity, TreeModel):
@property
def attributes(self):
if self.parent:
- return QuerySetMapper(self.attribute_set, passthrough=self.parent.attributes)
+ return QuerySetMapper(self.attribute_set
.all()
, passthrough=self.parent.attributes)
return super(TreeEntity, self).attributes
class Meta: