Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/flow render error #867

Merged
merged 16 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading