Skip to content

Commit

Permalink
[webui] Catch empty projects case...
Browse files Browse the repository at this point in the history
  • Loading branch information
saschpe committed Nov 16, 2011
1 parent 6c32117 commit 809c57b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/webui/app/controllers/project_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,12 @@ def show

# An incident has a patchinfo if there is a package 'patchinfo' with file '_patchinfo', try to find that:
@has_patchinfo = false
@packages.each do |pkg_element|
if pkg_element.name == 'patchinfo'
Package.find_cached(pkg_element.name, :project => @project).files.each do |pkg_file|
@has_patchinfo = true if pkg_file[:name] == '_patchinfo'
if @packages
@packages.each do |pkg_element|
if pkg_element.name == 'patchinfo'
Package.find_cached(pkg_element.name, :project => @project).files.each do |pkg_file|
@has_patchinfo = true if pkg_file[:name] == '_patchinfo'
end
end
end
end if @packages
Expand Down

0 comments on commit 809c57b

Please sign in to comment.