#102: Added general NOT feature to conditions
This commit is contained in:
@@ -710,7 +710,17 @@ class AppBase:
|
||||
continue
|
||||
|
||||
#print(destinationvalue)
|
||||
if not run_validation(sourcevalue, condition["condition"]["value"], destinationvalue):
|
||||
# NEGATE
|
||||
validation = run_validation(sourcevalue, condition["condition"]["value"], destinationvalue)
|
||||
|
||||
# Configuration = negated because of WorkflowAppActionParam..
|
||||
try:
|
||||
if condition["condition"]["configuration"]:
|
||||
validation = not validation
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
if not validation:
|
||||
self.logger.info("Failed condition check for %s %s %s." % (sourcevalue, condition["condition"]["value"], destinationvalue))
|
||||
return False, "Failed condition: %s %s %s" % (sourcevalue, condition["condition"]["value"], destinationvalue)
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ type AuthenticationUsage struct {
|
||||
}
|
||||
|
||||
// An app inside Shuffle
|
||||
// Source string `json:"source" datastore:"soure" yaml:"source"` - downloadlocation
|
||||
type WorkflowApp struct {
|
||||
Name string `json:"name" yaml:"name" required:true datastore:"name"`
|
||||
IsValid bool `json:"is_valid" yaml:"is_valid" required:true datastore:"is_valid"`
|
||||
|
||||
Reference in New Issue
Block a user