Skip to content

Commit

Permalink
Bugfix/flow render error (#867)
Browse files Browse the repository at this point in the history
* fix,inspector request miss data

* Fix the bug that flow render failed when config changed.

* supplement
  • Loading branch information
echoyang7 authored Jun 28, 2024
1 parent 4cdff44 commit 73d35cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lyrebird/mock/dm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import time
import codecs
from copy import deepcopy
import shutil
import traceback
from pathlib import Path
Expand Down Expand Up @@ -502,7 +503,7 @@ def get_matched_data(self, flow):
for _data_id in self.activated_data:
_data = self.activated_data[_data_id]
if self._is_match_rule(decode_flow, _data.get('rule')):
_matched_data.append(_data)
_matched_data.append(deepcopy(_data))
break

for response_data in _matched_data:
Expand Down
4 changes: 2 additions & 2 deletions lyrebird/mock/dm/temp_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from datetime import datetime
from urllib.parse import urlparse
from collections import OrderedDict
from copy import deepcopy

from lyrebird import application
from lyrebird.log import get_logger
from lyrebird.mock.dm.match import MatchRules
from lyrebird.utils import flow_data_2_str, render
Expand All @@ -31,7 +31,7 @@ def get_matched_data(self, flow):
_matched_data = []
for data in self.activated_data.values():
if MatchRules.match(flow, data.get('rule')):
_matched_data.append(data)
_matched_data.append(deepcopy(data))
break

for response_data in _matched_data:
Expand Down

0 comments on commit 73d35cb

Please sign in to comment.