]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: filter patches by state name
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Wed, 3 May 2017 11:43:04 +0000 (13:43 +0200)
committerStephen Finucane <stephen@that.guru>
Wed, 3 May 2017 14:23:10 +0000 (15:23 +0100)
commit6222574be4e75cdb78992239019c0ff681004085
tree55590e7816e04d7b1081759025a35885231935ca
parenta3911c5b7ec0bef056f90bf3bab90712dcff91dc
REST: filter patches by state name

Since we display the name of the state in the serialized patch, also
filter by name instead of primary key.

Also this will be consistent with the current documentation examples
(curl 'https://patchwork.example.com/api/patches?state=under-review')

Signed-off-by: Philippe Pepiot <philippe.pepiot@logilab.fr>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/api/filters.py
patchwork/tests/test_rest_api.py