From patchwork Tue Jan 6 10:21:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 426195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FDF914009B for ; Wed, 7 Jan 2015 22:14:37 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id EBC4F1A0ED9 for ; Wed, 7 Jan 2015 22:14:36 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org X-Greylist: delayed 2351 seconds by postgrey-1.35 at bilbo; Tue, 06 Jan 2015 22:00:56 AEDT Received: from sipsolutions.net (s3.sipsolutions.net [5.9.151.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 764561A078E for ; Tue, 6 Jan 2015 22:00:56 +1100 (AEDT) Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1Y8RGd-00067R-Hj; Tue, 06 Jan 2015 11:21:39 +0100 Message-ID: <1420539697.1966.10.camel@sipsolutions.net> Subject: [RFC/PATCH] fix xmlrpc delegate filtering From: Johannes Berg To: patchwork@lists.ozlabs.org Date: Tue, 06 Jan 2015 11:21:37 +0100 X-Mailer: Evolution 3.12.7-1 Mime-Version: 1.0 X-Mailman-Approved-At: Wed, 07 Jan 2015 22:14:30 +1100 Cc: Kalle Valo X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Trying to use pwclient list -d 'johannes@sipsolutions.net' doesn't result in any patches listed - it seems that the filter is constructed wrongly on the xmlrpc server side (going by how the submitter filter is done.) Signed-off-by: Johannes Berg --- I wasn't able to test this easily - but it looks like a change that should be simple to validate to anyone familiar with the code? diff --git a/apps/patchwork/views/xmlrpc.py b/apps/patchwork/views/xmlrpc.py index ca84c94cdc7c..1235ead64557 100644 --- a/apps/patchwork/views/xmlrpc.py +++ b/apps/patchwork/views/xmlrpc.py @@ -326,6 +326,9 @@ def patch_list(filter={}): elif parts[0] == 'submitter_id': dfilter['submitter'] = Person.objects.filter(id = filter[key])[0] + elif parts[0] == 'delegate_id': + dfilter['delegate'] = Person.objects.filter(id = + filter[key])[0] elif parts[0] == 'state_id': dfilter['state'] = State.objects.filter(id = filter[key])[0]