From b11d5a848d1587961e9f51ccbf3d10ee17ac7a87 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Fri, 16 Feb 2024 05:39:35 -0800 Subject: [PATCH] use logical AND not OR (#5889) --- kitsune/dashboards/readouts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kitsune/dashboards/readouts.py b/kitsune/dashboards/readouts.py index e68260e84ab..62180784663 100644 --- a/kitsune/dashboards/readouts.py +++ b/kitsune/dashboards/readouts.py @@ -5,6 +5,7 @@ is_ready_for_localization=False do not exist. """ + import logging from collections import OrderedDict from datetime import datetime @@ -57,8 +58,8 @@ is_approved=True, ) .filter( - Q(id__lte=F("document__latest_localizable_revision__id")) - | Q(id__gt=OuterRef("transdoc_current_revision_based_on_id")), + id__gt=OuterRef("transdoc_current_revision_based_on_id"), + id__lte=F("document__latest_localizable_revision__id"), ) .order_by() .values("document")