|
19 | 19 | "escape":"","schema":"","string_replace":"", |
20 | 20 | "parseURL":"","random":"","length":"","string_substring":"", |
21 | 21 | "array_join":"","controls_if":"","string_md5":"","string_contains":"", |
22 | | - "string_replace":"","slugify":"","trueCondition":"","isNull":"", |
| 22 | + "slugify":"","trueCondition":"","isNull":"", |
23 | 23 | "notEqual":"","equal":"","normalizeDateTime":"","normalizeDate":"", |
24 | 24 | "listContainsElement":""} |
25 | 25 |
|
@@ -86,9 +86,15 @@ def string_md5(): |
86 | 86 |
|
87 | 87 | def controls_if(): |
88 | 88 | if bool(global_dic["bool_b"]): |
89 | | - return str(global_dic["any_true"]) |
| 89 | + if "any_true" in global_dic: |
| 90 | + return str(global_dic["any_true"]) |
| 91 | + else: |
| 92 | + return None |
90 | 93 | else: |
91 | | - return str(global_dic["any_false"]) |
| 94 | + if "any_false" in global_dic: |
| 95 | + return str(global_dic["any_false"]) |
| 96 | + else: |
| 97 | + return None |
92 | 98 |
|
93 | 99 | def array_join(): |
94 | 100 | output = "" |
@@ -116,8 +122,8 @@ def toUpperCase(): |
116 | 122 | def helloworld(): |
117 | 123 | return "Hello World!" |
118 | 124 |
|
119 | | -def string_replace(): |
120 | | - return global_dic["valueParam"].replace(global_dic["param_find"],global_dic["param_replace"]) |
| 125 | +#def string_replace(): |
| 126 | +# return global_dic["valueParam"].replace(global_dic["param_find"],global_dic["param_replace"]) |
121 | 127 |
|
122 | 128 | def parseURL(): |
123 | 129 | parsed = {} |
@@ -257,7 +263,7 @@ def execution_dic(row,header,dic): |
257 | 263 | output[param] = string_substitution(dic["inputs"][inputs]["value"], "{(.+?)}", row, "subject", "yes", "None") |
258 | 264 | else: |
259 | 265 | output[param] = string_substitution_array(dic["inputs"][inputs]["value"], "{(.+?)}", row, header, "subject", "yes") |
260 | | - if output[param] == None: |
| 266 | + if output[param] == None and "controls_if" not in dic["function"]: |
261 | 267 | return None |
262 | 268 | else: |
263 | 269 | output[param] = dic["inputs"][inputs]["value"] |
|
0 commit comments