Skip to content

Commit

Permalink
* if no version is defined, the last one will be displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
grundprinzip committed Jan 4, 2010
1 parent 3a327f4 commit 42c61df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/burndowns_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.