Commit eb296c521a37c0efc7a7c4e4d1a9b66be098fc81
1 parent
821fc900
Exists in
master
and in
39 other branches
Inverting order of exclude/filter
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
src/super_archives/models.py
... | ... | @@ -160,9 +160,8 @@ class Thread(models.Model): |
160 | 160 | |
161 | 161 | def get_related(self): |
162 | 162 | query_string = u' '.join(self.tags.names()) |
163 | - query_set = SearchQuerySet().filter(content=query_string, | |
164 | - type='thread') | |
165 | - return query_set.exclude(django_id=self.pk) | |
163 | + query_set = SearchQuerySet().exclude(django_id=self.pk) | |
164 | + return query_set.filter(content=query_string, type='thread') | |
166 | 165 | |
167 | 166 | def save(self, *args, **kwargs): |
168 | 167 | super(Thread, self).save(*args, **kwargs) | ... | ... |