Skip to content

Commit

Permalink
Deployed Bleeders can not have their upgrade cancelled.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemming552 committed Jun 16, 2013
1 parent 6f72e3b commit b30f39b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Lacuna/RPC/Building/Development.pm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ sub cancel_build {
if (not $scheduled_building->is_upgrading) {
confess [1000, "That building is not currently being ugraded."];
}
my @non_cancel = ('Lacuna::DB::Result::Building::DeployedBleeder');
if (grep { $scheduled_building->class eq "$_" } @non_cancel) {
confess [1003, "That building can not have an upgrade cancelled."];
}
$scheduled_building->cancel_upgrade;

return $self->view($args->{session_id}, $args->{building_id});
Expand Down

0 comments on commit b30f39b

Please sign in to comment.