diff mbox

[RFC/PATCH] fix xmlrpc delegate filtering

Message ID 1420539697.1966.10.camel@sipsolutions.net
State Accepted
Headers show

Commit Message

Johannes Berg Jan. 6, 2015, 10:21 a.m. UTC
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 <johannes@sipsolutions.net>
---
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?

Comments

Jeremy Kerr March 22, 2015, 1:20 p.m. UTC | #1
Hi Johannes,

> 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.)

Thanks, applied.


Jeremy
diff mbox

Patch

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]