[PATCH conductor 2/2] BZ 785198 - Do not show broken builds in list
Matt Wagner
matt.wagner at redhat.com
Mon Feb 6 17:03:13 UTC 2012
We need to check for the presence of @latest_build to weed out builds
that started but subsequently failed. This brings the list of builds
into consistency with how the deployable details page works.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=785198
---
src/app/controllers/images_controller.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index 9bd6428..8b85612 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -317,7 +317,7 @@ class ImagesController < ApplicationController
protected
def load_target_images(build)
@target_images_by_target = {}
- return unless build
+ return unless build and @latest_build.present?
build.target_images.each {|timg| @target_images_by_target[timg.target] = timg}
@target_images_by_target
end
@@ -330,7 +330,7 @@ class ImagesController < ApplicationController
elsif @latest_build
@builds.find {|b| b.id == @latest_build}
else
- @builds.first
+ nil
end
end
--
1.7.6.5
More information about the aeolus-devel
mailing list