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
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-04-04 20:52:29 +0300
committerNick Thomas <nick@gitlab.com>2019-04-04 20:57:34 +0300
commitbeeeede2eed9bd78a5948178e270935fa9d92c51 (patch)
tree70b7158dbfe0254de807404f175ec572da629736 /app/graphql/gitlab_schema.rb
parent465f82e32cd1ca7c87ca7553e350af4c52b00805 (diff)
Fix a KeyError in GitlabSchema
Diffstat (limited to 'app/graphql/gitlab_schema.rb')
-rw-r--r--app/graphql/gitlab_schema.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb
index 7e3c09440a2..53efd9042b1 100644
--- a/app/graphql/gitlab_schema.rb
+++ b/app/graphql/gitlab_schema.rb
@@ -31,7 +31,7 @@ class GitlabSchema < GraphQL::Schema
end
def self.max_query_complexity(ctx)
- current_user = ctx&.fetch(:current_user)
+ current_user = ctx&.fetch(:current_user, nil)
if current_user&.admin
ADMIN_COMPLEXITY