Skip to content

Commit 64cd6d8

Browse files
committed
fix(checks): use same prefix for filtering
This allows to use just one nested query.
1 parent 3b92090 commit 64cd6d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

weblate/checks/source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def get_related_checks(self, unit_ids: Iterable[int]):
6868
from weblate.checks.models import Check
6969

7070
return Check.objects.filter(
71-
Q(unit_id__in=unit_ids) | Q(unit__source_unit_id__in=unit_ids)
71+
Q(unit__id__in=unit_ids) | Q(unit__source_unit_id__in=unit_ids)
7272
).select_related("unit__translation")
7373

7474
def check_source_unit(self, sources: list[str], unit: Unit):

0 commit comments

Comments
 (0)