[RFC/PATCH] fix xmlrpc delegate filtering

Johannes Berg johannes at sipsolutions.net
Tue Jan 6 21:21:37 AEDT 2015


Trying to use
  pwclient list -d 'johannes at 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 at 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?

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]




More information about the Patchwork mailing list