Skip to content

Commit

Permalink
make sure flow type is HookedDict when match rule (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
noO0oOo0ob authored Dec 1, 2023
1 parent 5c1ac31 commit 3493529
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lyrebird/mock/handlers/function_executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
import traceback
from lyrebird.log import get_logger
from lyrebird.utils import HookedDict

logger = get_logger()

Expand Down Expand Up @@ -28,6 +29,8 @@ def func_handler(func_list, flow, handler_type='flow_editor'):
@staticmethod
def get_matched_sorted_handler(func_list, flow):
matched_func = []
if not isinstance(flow, HookedDict):
flow = HookedDict(flow)
for func in func_list:
rules = func['rules']
if not rules or FunctionExecutor._is_req_match_rule(rules, flow):
Expand Down

0 comments on commit 3493529

Please sign in to comment.