Commit ed0547b7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Require container registry entities in controllers

parent ee6f5002
......@@ -21,7 +21,7 @@ module Projects
private
def image
@image ||= project.container_repositories.find_by(id: params[:id])
@image ||= project.container_repositories.find(params[:id])
end
##
......
......@@ -17,11 +17,13 @@ module Projects
def repository
@image ||= project.container_repositories
.find_by(id: params[:repository_id])
.find(params[:repository_id])
end
def tag
@tag ||= repository.tag(params[:id]) if params[:id].present?
return render_404 unless params[:id].present?
@tag ||= repository.tag(params[:id])
end
end
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