[refs #537] fixed build list publish transaction

This commit is contained in:
Alexander Machehin 2012-06-22 16:33:03 +06:00
parent 5a566f37cc
commit 9a2dcda3d1
1 changed files with 4 additions and 0 deletions

View File

@ -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