From 9a2dcda3d1825c516ac3de6c839d5d5fb12de146 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Fri, 22 Jun 2012 16:33:03 +0600 Subject: [PATCH] [refs #537] fixed build list publish transaction --- app/models/build_list.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 8daf300ac..b46bd1eba 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -182,6 +182,10 @@ class BuildList < ActiveRecord::Base [BUILD_PENDING, BuildServer::PLATFORM_PENDING].include? status && bs_id end + def can_publish? + [BuildServer::SUCCESS, FAILED_PUBLISH].include? status + end + def can_reject_publish? can_publish? and save_to_platform.released end