From: Stephen Burrows Date: Fri, 29 Oct 2010 21:03:14 +0000 (-0400) Subject: Tweaked Entity and TreeEntity to pass an actual queryset to QuerySetMapper instead... X-Git-Tag: philo-0.9~26^2~10 X-Git-Url: http://git.ithinksw.org/philo.git/commitdiff_plain/585c315fde9781b72e1bacd430877c1e5b110e90 Tweaked Entity and TreeEntity to pass an actual queryset to QuerySetMapper instead of a manager. The results are generally the same, and anyone accessing querysetmapper.queryset will be expecting to find a queryset. --- diff --git a/models/base.py b/models/base.py index 0077250..1b6e60f 100644 --- 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: