Skip to content

Error 500 loading a merge request: undefined method `map' for nil:NilClass

Broken URL: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6465

https://sentry.gitlap.com/gitlab/gitlabcom/issues/12200/

NoMethodError: undefined method `map' for nil:NilClass
Did you mean?  tap
  app/models/merge_request_diff.rb:124:in `commits_sha'
    st_commits.map { |commit| commit[:id] }
  app/models/merge_request.rb:916:in `all_commits_sha'
    merge_request_diffs.flat_map(&:commits_sha).uniq
  lib/gitlab/metrics/instrumentation.rb:155:in `block in all_commits_sha'
    trans.method_call_for(#{label.to_sym.inspect}).measure { super }
  lib/gitlab/metrics/method_call.rb:23:in `measure'
    retval = yield
  lib/gitlab/metrics/instrumentation.rb:155:in `all_commits_sha'
    trans.method_call_for(#{label.to_sym.inspect}).measure { super }
...
(173 additional frame(s) were not displayed)

ActionView::Template::Error: undefined method `map' for nil:NilClass
Did you mean?  tap