[PATCH conductor] BZ 800837 - Vanished instances are now included in failed?
Matt Wagner
matt.wagner at redhat.com
Wed Mar 7 22:54:05 UTC 2012
The failed? method on an instance was not considering STATE_VANISHED
to be a failure, causing (among other things) the 'error' icon to not
display in table view. This fixes this, and has the incidental benefit
of making the code slightly more compact by using the existing FAILED_STATES
constant instead of a series of checks.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=800837
---
src/app/models/instance.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/models/instance.rb b/src/app/models/instance.rb
index d2c5f8e..ad7907a 100644
--- a/src/app/models/instance.rb
+++ b/src/app/models/instance.rb
@@ -333,7 +333,7 @@ class Instance < ActiveRecord::Base
end
def failed?
- state == Instance::STATE_CREATE_FAILED || state == Instance::STATE_ERROR
+ FAILED_STATES.include?(state)
end
def requires_config_server?
--
1.7.7.6
More information about the aeolus-devel
mailing list