From nobody Sat Dec 21 15:37:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1645527665; cv=none; d=zohomail.com; s=zohoarc; b=PgEeJNzbxtO2fV9Uvc4Rajt97e7D/zBkiLhCUFeyo+Zgx8aLuqTluN9tKCccqXjyeHMgRlDJAANhlxa650oYbOQhQMb8ILUrL3mCDsr96uIkv0uuOw9bFnISj1IOR6n8yEEZSHO7bmfcrCmPjbtv6z8pBlSq3rqLRrrTLTgXR1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645527665; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=6R2wjUD+LbR+Sn4YgBQZL+K7cXmc/V7RlqGEackI30c=; b=OXfMJc1FcbxMhI/pvY7c411IvxUBQHKq6fRqSMIhaVwqe3u0tIRvnMxJGUvpWfXqSMtkDBA85usqIVQfsuvziVVh641wgGUGoEX0PH6UND1kzXSwI+Si2ffQgstOv+3jNdBtH0T1h1Af8Yf2W7IGrcOy1iLdKYj/b+u1TBxNwb4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1645527665110728.0233399419525; Tue, 22 Feb 2022 03:01:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-198-g_FU3mMiPb-2x_r7Nd_QHA-1; Tue, 22 Feb 2022 06:01:02 -0500 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 ADEE21091DA3; Tue, 22 Feb 2022 11:01:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A350C7BB60; Tue, 22 Feb 2022 11:01:01 +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 969081809C98; Tue, 22 Feb 2022 11:01:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21MB10mG019117 for ; Tue, 22 Feb 2022 06:01:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 77627785FE; Tue, 22 Feb 2022 11:01:00 +0000 (UTC) Received: from avogadro.lan (unknown [10.39.195.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0A93785FD for ; Tue, 22 Feb 2022 11:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645527663; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6R2wjUD+LbR+Sn4YgBQZL+K7cXmc/V7RlqGEackI30c=; b=Pu6Q7GSFH1MXo5WatS4o8lbWX1Ndjy1blon2loM2mvFTbHJdaItXb0H4Z6/T99zNd0Pqig XtWuCqJjDOjDXs2JTM6xcnt37vUykEseOKyEHG8P6Mzy8C4IasxBoEpuJ+VnHtKMQofmzT kpyknu2oBOYc3H1nIo26TJSBRFoZGA4= X-MC-Unique: g_FU3mMiPb-2x_r7Nd_QHA-1 From: Paolo Bonzini To: patchew-devel@redhat.com Date: Tue, 22 Feb 2022 12:00:44 +0100 Message-Id: <20220222110044.173882-2-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] maintainers: clarify when the "Watch query" button would replace the current watched query 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 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1645527665931100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- mods/maintainer.py | 6 ++++-- www/templates/series-list.html | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/maintainer.py b/mods/maintainer.py index 8e05a9c..70d0ea5 100644 --- a/mods/maintainer.py +++ b/mods/maintainer.py @@ -182,8 +182,10 @@ class MaintainerModule(PatchewModule): def render_page_hook(self, request, context_data): if request.user.is_authenticated and context_data.get("is_search"): q =3D WatchedQuery.objects.filter(user=3Drequest.user).first() - if q and q.query =3D=3D context_data.get("search"): - context_data["is_watched_query"] =3D True + if q: + context_data["has_watched_query"] =3D True + if q.query =3D=3D context_data.get("search"): + context_data["is_watched_query"] =3D True =20 def www_view_watch_query(self, request): if not request.user.is_authenticated: diff --git a/www/templates/series-list.html b/www/templates/series-list.html index 83bde7f..27c0d9c 100644 --- a/www/templates/series-list.html +++ b/www/templates/series-list.html @@ -78,6 +78,8 @@ {% if is_search %} {% if is_watched_query %}

Saved as my watched query

+ {% elif has_watched_query %} + {% else %} {% endif %} --=20 2.34.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel