Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2018-10-26 05:47:14 +0300
committerHeinrich Lee Yu <hleeyu@gmail.com>2018-10-26 05:47:14 +0300
commite0f0c29b0cfe3c0c97191eeb96eae1299f3983d1 (patch)
treef5227f2614264fb1820ab1747579e11a5c9826c5 /lib
parentbf1ed85a9d6a932a99d0a5fdf70e72ea36c2600c (diff)
Support lowercase none / any
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers/custom_validators.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers/custom_validators.rb b/lib/api/helpers/custom_validators.rb
index e4af75f1971..1058f4e8a5e 100644
--- a/lib/api/helpers/custom_validators.rb
+++ b/lib/api/helpers/custom_validators.rb
@@ -16,7 +16,7 @@ module API
value = params[attr_name]
return if value.is_a?(Integer) ||
- [IssuableFinder::FILTER_NONE, IssuableFinder::FILTER_ANY].include?(value)
+ [IssuableFinder::FILTER_NONE, IssuableFinder::FILTER_ANY].include?(value.to_s.downcase)
raise Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)],
message: "should be an integer, 'None' or 'Any'"