Commit 66c1700c9c406ae8a80ea03ac993723b6f09d88b
1 parent
2a75df04
Exists in
master
and in
39 other branches
Removing self from related documents
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
src/super_archives/models.py
... | ... | @@ -160,7 +160,8 @@ class Thread(models.Model): |
160 | 160 | |
161 | 161 | def get_related(self): |
162 | 162 | query_string = u' '.join(self.tags.names()) |
163 | - return SearchQuerySet().filter(text=query_string) | |
163 | + query_set = SearchQuerySet().filter(content=query_string) | |
164 | + return query_set.exclude(django_id=self.pk) | |
164 | 165 | |
165 | 166 | def save(self, *args, **kwargs): |
166 | 167 | super(Thread, self).save(*args, **kwargs) | ... | ... |