diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-04-22 18:07:19 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-04-29 08:28:43 +0200 |
commit | 33cf8edae170890ccd4510490f1dcd2f345c81fa (patch) | |
tree | 4d989e20136ecf21d5f89df59ea7dbb43c534a55 /app/graphql | |
parent | ee4ccd31556f8be905e968af448bbb4ecf62dcb6 (diff) | |
download | gitlab-ce-33cf8edae170890ccd4510490f1dcd2f345c81fa.tar.gz |
Port changes for design management to CE
This ports the changes from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10462/
to CE
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/resolvers/issues_resolver.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/graphql/resolvers/issues_resolver.rb b/app/graphql/resolvers/issues_resolver.rb index b98d8bd1fff..54d32a688bf 100644 --- a/app/graphql/resolvers/issues_resolver.rb +++ b/app/graphql/resolvers/issues_resolver.rb @@ -44,6 +44,12 @@ module Resolvers alias_method :project, :object def resolve(**args) + # The project could have been loaded in batch by `BatchLoader`. + # At this point we need the `id` of the project to query for issues, so + # make sure it's loaded and not `nil` before continueing. + project.sync if project.respond_to?(:sync) + return Issue.none if project.nil? + # Will need to be be made group & namespace aware with # https://gitlab.com/gitlab-org/gitlab-ce/issues/54520 args[:project_id] = project.id |