Skip to content

Error 500 getting deploy keys in project settings due to path helpers

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

ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"projects", :id=>#<Project id: 3222334, name: "bgy", path: "bgy", description: "", created_at: "2017-05-02 06:31:57", ..., :namespace_id=>nil} missing required keys: [:namespace_id]
  config/application.rb:186:in `block (4 levels) in <class:Application>'
    send(name, project&.namespace, project, *args)
  app/serializers/project_entity.rb:8:in `block in <class:ProjectEntity>'
    project_path(project)
  app/serializers/base_serializer.rb:11:in `represent'
    .as_json
  app/presenters/projects/settings/deploy_keys_presenter.rb:50:in `as_json'
    public_keys: serializer.represent(available_public_keys, opts)
  app/controllers/projects/deploy_keys_controller.rb:15:in `block (2 levels) in index'
    render json: Projects::Settings::DeployKeysPresenter.new(@project, current_user: current_user).as_json
...
(153 additional frame(s) were not displayed)

ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"projects", :id=>#<Project id: 3222334, name: "bgy", path: "bgy",...  last_repository_updated_at: nil, ci_config_path: nil, disable_overriding_approvers_per_merge_request: nil>, :namespace_id=>nil} missing required keys: [:namespace_id]
Edited by Stan Hu