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:
authorRobert Speicher <robert@gitlab.com>2017-03-21 10:21:01 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-03-21 12:18:55 +0300
commit50d73ce0ec7e33353b2d5c24eb92075d9add1b3a (patch)
tree72f9e560cc3d1388e4c558f8fb687008f6dc0500 /lib
parent9807ffaa48b15019e13364fa1152489770b549b8 (diff)
Merge branch 'sh-fix-admin-application-settings' into 'master'
Fix Error 500 when application settings are saved Closes #29674 and #29115 See merge request !10070
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/visibility_level.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb
index 2248763c106..8f1d1fdc02e 100644
--- a/lib/gitlab/visibility_level.rb
+++ b/lib/gitlab/visibility_level.rb
@@ -96,8 +96,8 @@ module Gitlab
end
def level_value(level)
- return string_options[level] if level.is_a? String
- level
+ return level.to_i if level.to_i.to_s == level.to_s && string_options.key(level.to_i)
+ string_options[level] || PRIVATE
end
def string_level(level)