summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-12-16 23:54:43 +0000
committerStan Hu <stanhu@gmail.com>2016-12-16 23:54:43 +0000
commit8592f10a306c3dfc98f17cf910420f159093fbec (patch)
tree46cfb1f951ef3c7683926fe8ccb5ad534e924bfe
parenta22be3065dc9c80d3a18ca81eda480b9c39e35a6 (diff)
parent34ed74fab90904eb77c8b07779401650684af5b1 (diff)
downloadgitlab-ce-8592f10a306c3dfc98f17cf910420f159093fbec.tar.gz
Merge branch 'fix/keep-compatility-ruby-21' into 'master'
Avoid use of Hash#dig to keep compatibility with Ruby 2.1 See merge request !8153
-rw-r--r--app/controllers/concerns/oauth_applications.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/oauth_applications.rb b/app/controllers/concerns/oauth_applications.rb
index 7210ed3eb32..9849aa93fa6 100644
--- a/app/controllers/concerns/oauth_applications.rb
+++ b/app/controllers/concerns/oauth_applications.rb
@@ -6,7 +6,7 @@ module OauthApplications
end
def prepare_scopes
- scopes = params.dig(:doorkeeper_application, :scopes)
+ scopes = params.fetch(:doorkeeper_application, {}).fetch(:scopes, nil)
if scopes
params[:doorkeeper_application][:scopes] = scopes.join(' ')