Commit 378a0e25 authored by Michal Čihař's avatar Michal Čihař

Lookup for checks

parent d1f54c39
......@@ -68,4 +68,11 @@ class UnitManager(models.Manager):
project = sample.translation.subproject.project)
sugs = sugs.values_list('checksum', flat = True)
return self.filter(checksum__in = sugs)
elif rqtype in [x[0] for x in trans.models.CHECK_CHOICES]:
sample = self.all()[0]
sugs = trans.models.Check.objects.filter(
language = sample.translation.language,
project = sample.translation.subproject.project,
check = rqtype)
sugs = sugs.values_list('checksum', flat = True)
return self.filter(checksum__in = sugs)
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