summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-16 19:59:53 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-16 19:59:53 -0200
commit34ed74fab90904eb77c8b07779401650684af5b1 (patch)
treed22680cfeefe5bad7146a00d9766e5fabb81b8d7
parentb1120fc3e702daac001d000263eac79f4629b595 (diff)
downloadgitlab-ce-fix/keep-compatility-ruby-21.tar.gz
Avoid use of Hash#dig to keep compatibility with Ruby 2.1fix/keep-compatility-ruby-21
-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(' ')