From nobody Fri Oct 18 08:34:00 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048696; cv=none; d=zohomail.com; s=zohoarc; b=OfRpjd+S5WsoK9dGHKWgtlEmduRBZD/bhkMLUNi91/trPVoLUisXw+EHGdSPkA6Z89msAazX/id+5tMzoLeTZJTcxYy4EtZ029jpSXyZwQqS5nBDNuTFhPas0spJf1VWpxnwbpzavY+p9K6ZGoGHXmqe8FoWP4HgBCBy8sTQZPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048696; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kA1r8+bHk95+7fAPacoRjLp8pCxHbzwdD/cqJT4q8m8=; b=mKhLRv1R6HWHtBOrNh8ndFb80X6JePSFgRuAaKzzbBdxS6LQaoAy0q2yzHioZRmgWhy5ySFllSweRplDb7kbGeP4NAH3R364uH9xtWnw6Rs0UX8sOEwzqTAGTKeOtQVkftR6Dvygmn+RFN1eTQUP1k616a5IJFMHdhf5j6EpH40= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601048696525724.9988963724455; Fri, 25 Sep 2020 08:44:56 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-411-fwJQTNB3N7ed1F4SbqY-gw-1; Fri, 25 Sep 2020 11:44:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44891802EA3; Fri, 25 Sep 2020 15:44:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C0FB5C1BB; Fri, 25 Sep 2020 15:44:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 355A08C7A2; Fri, 25 Sep 2020 15:44:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFioMD024451 for ; Fri, 25 Sep 2020 11:44:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 252712166B27; Fri, 25 Sep 2020 15:44:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 209E62157F24 for ; Fri, 25 Sep 2020 15:44:47 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15CF0101A56E for ; Fri, 25 Sep 2020 15:44:47 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-SWw2ZITsOAG7CECX_qsj1w-1; Fri, 25 Sep 2020 11:44:40 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 1601048667470703.1533862758714; Fri, 25 Sep 2020 23:44:27 +0800 (CST) X-MC-Unique: fwJQTNB3N7ed1F4SbqY-gw-1 X-MC-Unique: SWw2ZITsOAG7CECX_qsj1w-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-6-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:37 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFioMD024451 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 05/11] topic: Fix for_stripped_subject X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fam Zheng We are looking for a topic here, so including any message that happends to have the same stripped_subject but doesn't have topic is moot and will lead to an exception. --- api/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/models.py b/api/models.py index 69b6817..fd6990f 100644 --- a/api/models.py +++ b/api/models.py @@ -544,7 +544,7 @@ class QueuedSeries(models.Model): class TopicManager(models.Manager): def for_stripped_subject(self, stripped_subject): q =3D ( - Message.objects.filter(stripped_subject=3Dstripped_subject) + Message.objects.filter(stripped_subject=3Dstripped_subject, to= pic__isnull=3DFalse) .order_by("date") .reverse()[:1] .values("topic") --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel