Change REST API's __contains to OR behavior#3531
Conversation
|
@jangmarker, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rodrigc, @tardyp and @delanne to be potential reviewers. |
1 similar comment
|
@jangmarker, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rodrigc, @tardyp and @delanne to be potential reviewers. |
Codecov Report
@@ Coverage Diff @@
## master #3531 +/- ##
=======================================
Coverage 88.27% 88.27%
=======================================
Files 323 323
Lines 33780 33780
=======================================
Hits 29818 29818
Misses 3962 3962
Continue to review full report at Codecov.
|
Although the documentation suggests that multiple __contains filter where connected with OR (similar to __eq and __ne) they were connected with AND. Fix this behavior.
ca9eb82 to
c0754c3
Compare
master/docs/developer/rest.rst
Outdated
| select resources where the field's value is greater than or equal to ``{value}`` | ||
| ``contains`` | ||
| select resources where the field's value contains ``{value}`` | ||
| select resources where the field's value contains ``{value}``, or with the same parameter appearing multiple times contains one of the values (so `foo__contains=x&foo__contains=y` would match resources where foo contains `x`, `y` or both) |
There was a problem hiding this comment.
This is an awkwardly long sentence. The addition in this PR should be its own sentence.
There was a problem hiding this comment.
I've split the sentences.
c0754c3 to
20884ae
Compare
|
@seankelly @tardyp thanks for your reviews! Can this be merged then? I would like to rebase #3526 after this has been merged. |
Created out of a discussion in #3526.
Fixes #3527.
Contributor Checklist:
master/buildbot/newsfragmentdirectory (and read theREADME.txtin that directory)