Skip to content

Commit ff7aff7

Browse files
committed
[bugfix][update analysis node attribute's name error]
1 parent fae1ae0 commit ff7aff7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

muagent/schemas/ekg/ekg_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class EKGAnalysisNodeSchema(EKGNodeSchema):
109109
# when to access
110110
accesscriteria: str = '{}'
111111
# do summary or not
112-
summaryswtich: bool = False
112+
summaryswitch: bool = False
113113
# summary template
114114
dsltemplate: str = ''
115115

@@ -153,7 +153,7 @@ class EKGGraphSlsSchema(BaseModel):
153153
extra: str = ''
154154
enable: bool = False
155155
dsltemplate: str = ''
156-
summaryswtich: bool = False
156+
summaryswitch: bool = False
157157

158158
gdb_timestamp: int
159159
original_src_id1__: str = ""

muagent/service/ekg_construct/ekg_construct_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ def _normalized_nodes_type(self, nodes: List[GNode]) -> List[GNode]:
11051105
for node in nodes:
11061106
node_type = node.type
11071107
node_data_dict = {**{"id": node.id, "type": node_type}, **node.attributes}
1108-
node_data_dict = {k: 'False' if k in ["enable", "summaryswtich"] and v=="" else v for k,v in node_data_dict.items()}
1108+
node_data_dict = {k: 'False' if k in ["enable", "summaryswitch"] and v=="" else v for k,v in node_data_dict.items()}
11091109
node_data: EKGNodeSchema = TYPE2SCHEMA[node_type](**node_data_dict)
11101110
valid_node = GNode(id=node.id, type=node_type, attributes=node_data.attributes())
11111111
valid_nodes.append(valid_node)

tests/service/ekg_construct_test_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def generate_node(id, type):
108108

109109
if type == "opsgptkg_analysis":
110110
extra_attr["accesscriteria"] = "hello"
111-
extra_attr["summaryswtich"] = False
111+
extra_attr["summaryswitch"] = False
112112
extra_attr['dsltemplate'] = "hello"
113113

114114
return GNode(**{

0 commit comments

Comments
 (0)