Commit 8352e2bc authored by Matija Čupić's avatar Matija Čupić

Remove dashboard_project ambiguity

parent 63589d9a
......@@ -5,8 +5,8 @@ class DashboardOperationsProjectEntity < Grape::Entity
expose :project, merge: true, using: API::Entities::BasicProjectDetails
expose :remove_path do |dashboard_project|
remove_operations_project_path(project_id: dashboard_project.project.id)
expose :remove_path do |dashboard_project_object|
remove_operations_project_path(project_id: dashboard_project_object.project.id)
end
expose :last_pipeline, if: -> (*) { last_pipeline } do |_, options|
......@@ -21,15 +21,15 @@ class DashboardOperationsProjectEntity < Grape::Entity
pipeline_entity_for(downstream_pipelines, options)
end
expose :last_deployment, if: -> (*) { last_deployment? } do |dashboard_project, options|
DeploymentEntity.represent(dashboard_project.last_deployment,
expose :last_deployment, if: -> (*) { last_deployment? } do |dashboard_project_object, options|
DeploymentEntity.represent(dashboard_project_object.last_deployment,
options.merge(request: new_request))
end
expose :alert_count
expose :alert_path, if: -> (*) { last_deployment? } do |dashboard_project|
project = dashboard_project.project
environment = dashboard_project.last_deployment.environment
expose :alert_path, if: -> (*) { last_deployment? } do |dashboard_project_object|
project = dashboard_project_object.project
environment = dashboard_project_object.last_deployment.environment
metrics_project_environment_path(project, environment)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment