Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/pontoon/base/models.py b/pontoon/base/models.py
- index d5c353b..38b8a5e 100644
- --- a/pontoon/base/models.py
- +++ b/pontoon/base/models.py
- @@ -1236,34 +1236,23 @@ class EntityQuerySet(models.QuerySet):
- )
- )
- - def fuzzy(self, locale):
- - return self.with_status_counts(locale).filter(
- - Q(fuzzy_count=F('expected_count')) & ~Q(approved_count=F('expected_count'))
- - )
- + def fuzzy(self):
- + return Q(fuzzy_count=F('expected_count')) & ~Q(approved_count=F('expected_count'))
- --- a/pontoon/base/tests/test_models.py
- +++ b/pontoon/base/tests/test_models.py
- @@ -1158,7 +1158,10 @@ class EntityFilterTests(TestCase):
- fuzzy=True
- )
- - assert_equal({first_entity, third_entity}, set(Entity.objects.fuzzy(self.locale)))
- + assert_equal(
- + {first_entity, third_entity},
- + set(Entity.objects.with_status_counts(self.locale).filter(Entity.objects.fuzzy()))
- + )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement