Skip to content

Commit c7ad052

Browse files
author
Riko
committed
fix issue unavailable pattern in condition
1 parent c94e9ab commit c7ad052

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

waf_regex/logic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ def remove_match_set(self,match_set_id):
136136
match_set_object = self.get_match_set(match_set_id)
137137

138138
for match_tuple in match_set_object['RegexMatchSet']['RegexMatchTuples']:
139-
self.delete_match_set(match_set_id,match_tuple)
140-
self.remove_pattern_set(match_tuple['RegexPatternSetId'])
139+
if bool(match_tuple):
140+
self.delete_match_set(match_set_id,match_tuple)
141+
self.remove_pattern_set(match_tuple['RegexPatternSetId'])
141142

142143
changeToken = self.client.get_change_token()
143144
response = self.client.delete_regex_match_set(

0 commit comments

Comments
 (0)