File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2788,7 +2788,11 @@ def list_cidr_ips(self, cidr):
27882788
27892789 return returnvalue
27902790
2791- def if_else_routing (self , conditions ):
2791+ def switch (self , conditions ):
2792+ # Check if conditions is a list or not
2793+ if not isinstance (conditions , list ):
2794+ conditions = [conditions ]
2795+
27922796 # True by default
27932797 to_return = {
27942798 "success" : True ,
Original file line number Diff line number Diff line change 11# self, sourcevalue, condition, destinationvalue
2- def run_validation (sourcevalue , check , destinationvalue ):
2+ def validate_condition (sourcevalue , check , destinationvalue ):
33 if check == "=" or check == "==" or check .lower () == "equals" :
44 if str (sourcevalue ).lower () == str (destinationvalue ).lower ():
55 return True
@@ -113,7 +113,7 @@ def evaluate_conditions(condition_structure):
113113 destination = condition_structure ['destination' ]
114114
115115 # self.
116- return run_validation (source , condition , destination )
116+ return validate_condition (source , condition , destination )
117117
118118 # Recursive case: Logical operator
119119 elif operator == "AND" :
You can’t perform that action at this time.
0 commit comments