Permalink
Browse files

* if no version is defined, the last one will be displayed

  • Loading branch information...
1 parent 3a327f4 commit 42c61dfafc57260bb62c4d66b6846f6cf01e66b5 @grundprinzip committed Jan 4, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 app/controllers/burndowns_controller.rb
@@ -12,6 +12,10 @@ def show
def find_version_and_project
@project = Project.find(params[:project_id])
@version = params[:id] ? @project.versions.find(params[:id]) : @project.current_version
+
+ unless @version and @project.versions.size > 0
+ @version = @project.versions.first
+ end
render_error(l(:burndown_text_no_sprint)) and return unless @version
end
end

0 comments on commit 42c61df

Please sign in to comment.