Commit 058bcba0 authored by Michal Čihař's avatar Michal Čihař

Make more_like_this not return matches already returned by same_source

parent c8f903e4
......@@ -388,8 +388,12 @@ class UnitManager(models.Manager):
source_string,
500
)
# Include all more like this results
for result in more_results:
checksums.add(result['checksum'])
# Remove all original matches
for result in results:
checksums.discard(result['checksum'])
return self.filter(
checksum__in=checksums,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment