summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py
index 71b9e181..7a3496a0 100644
--- a/main/models.py
+++ b/main/models.py
@@ -303,7 +303,10 @@ class Todolist(models.Model):
@property
def packages(self):
- return TodolistPkg.objects.select_related().filter(list=self).order_by('pkg')
+ # TODO: bug here, because we do foreign keys all wrong the join query fucks up when it
+ # can't find a foreign key that is missing values, e.g. maintainer == 0.
+ # Once this is fixed, we can remove the depth argument.
+ return TodolistPkg.objects.select_related(depth=1).filter(list=self).order_by('pkg')
@property
def package_names(self):