diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-24 03:09:04 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-24 03:09:04 +0000 |
commit | 93b0b77287acb1cf1a6a408b3a4e9587bedc9364 (patch) | |
tree | 8bf7121ae9329c82dbc85745fe4c8d831ef3cea0 /app/graphql/gitlab_schema.rb | |
parent | 27f3465d8a52afce630417b6e4b58992b6e403fe (diff) | |
download | gitlab-ce-93b0b77287acb1cf1a6a408b3a4e9587bedc9364.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/gitlab_schema.rb')
-rw-r--r-- | app/graphql/gitlab_schema.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb index eb083950fff..5db24d07e4b 100644 --- a/app/graphql/gitlab_schema.rb +++ b/app/graphql/gitlab_schema.rb @@ -124,7 +124,7 @@ class GitlabSchema < GraphQL::Schema raise Gitlab::Graphql::Errors::ArgumentError, "#{global_id} is not a valid GitLab ID." unless gid - if expected_type && !gid.model_class.ancestors.include?(expected_type) + if expected_type && gid.model_class.ancestors.exclude?(expected_type) vars = { global_id: global_id, expected_type: expected_type } msg = _('%{global_id} is not a valid ID for %{expected_type}.') % vars raise Gitlab::Graphql::Errors::ArgumentError, msg |