diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py index c3cb5cf0..79d99e8c 100644 --- a/main/models.py +++ b/main/models.py @@ -307,7 +307,8 @@ class Todolist(models.Model): @property def package_names(self): - return '\n'.join(set([p.pkg.pkgname for p in self.packages])) + # depends on packages property returning a queryset + return self.packages.values_list('pkg__pkgname', flat=True).distinct() class Meta: db_table = 'todolists' |