Fixed condition

Change-Id: Iba221fd729513912ec0af87354830065618fb861
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 5a5ce86..91da71f 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -271,7 +271,7 @@
         }
         for (node in entry) {
             for (resource in node.value) {
-                if( resource[value] && resource[value][result] && resource[value][result] != true) {
+                if(!resource[result] || resource[result] != "true") {
                     if (failOnError) {
                         throw new Exception("Salt state on node ${node.key} failed: ${node.value}")
                     } else {