Skip to content

Commit a1170df

Browse files
committed
Revert 1.2.1 shuffle tools
1 parent 38a1bda commit a1170df

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

shuffle-tools/1.2.0/src/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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,

shuffle-tools/1.2.0/src/switch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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":

0 commit comments

Comments
 (0)