@@ -37,11 +37,6 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None:
3737 SET diff_root.diff_branch = diff_root_map.diff_branch
3838 SET diff_root.from_time = diff_root_map.from_time
3939 SET diff_root.to_time = diff_root_map.to_time
40- SET diff_root.num_added = diff_root_map.num_added
41- SET diff_root.num_updated = diff_root_map.num_updated
42- SET diff_root.num_removed = diff_root_map.num_removed
43- SET diff_root.num_conflicts = diff_root_map.num_conflicts
44- SET diff_root.contains_conflict = diff_root_map.contains_conflict
4540 SET diff_root.tracking_id = diff_root_map.tracking_id
4641 RETURN diff_root
4742}
@@ -68,11 +63,6 @@ def _build_diff_root_params(self, enriched_diffs: EnrichedDiffs | EnrichedDiffsM
6863 "to_time" : enriched_diff .to_time .to_string (),
6964 "uuid" : enriched_diff .uuid ,
7065 "tracking_id" : enriched_diff .tracking_id .serialize () if enriched_diff .tracking_id else None ,
71- "num_added" : enriched_diff .num_added ,
72- "num_updated" : enriched_diff .num_updated ,
73- "num_removed" : enriched_diff .num_removed ,
74- "num_conflicts" : enriched_diff .num_conflicts ,
75- "contains_conflict" : enriched_diff .contains_conflict ,
7666 }
7767 )
7868 return {"diff_root_list" : diff_root_list }
@@ -96,7 +86,12 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None:
9686 WITH root_uuid, node_map
9787 MATCH (diff_root {uuid: root_uuid})
9888 MERGE (diff_root)-[:DIFF_HAS_NODE]->(diff_node:DiffNode {uuid: node_map.node_properties.uuid})
99- SET diff_node = node_map.node_properties
89+ SET
90+ diff_node.kind = node_map.node_properties.kind,
91+ diff_node.label = node_map.node_properties.label,
92+ diff_node.changed_at = node_map.node_properties.changed_at,
93+ diff_node.action = node_map.node_properties.action,
94+ diff_node.path_identifier = node_map.node_properties.path_identifier
10095 // -------------------------
10196 // add/remove node-level conflict
10297 // -------------------------
@@ -324,11 +319,6 @@ def _build_diff_attribute_params(self, enriched_attribute: EnrichedDiffAttribute
324319 "changed_at" : enriched_attribute .changed_at .to_string (),
325320 "action" : enriched_attribute .action .value ,
326321 "path_identifier" : enriched_attribute .path_identifier ,
327- "num_added" : enriched_attribute .num_added ,
328- "num_updated" : enriched_attribute .num_updated ,
329- "num_removed" : enriched_attribute .num_removed ,
330- "num_conflicts" : enriched_attribute .num_conflicts ,
331- "contains_conflict" : enriched_attribute .contains_conflict ,
332322 },
333323 "properties" : property_props ,
334324 }
@@ -349,11 +339,6 @@ def _build_diff_single_relationship_params(
349339 "peer_id" : enriched_single_relationship .peer_id ,
350340 "peer_label" : enriched_single_relationship .peer_label ,
351341 "path_identifier" : enriched_single_relationship .path_identifier ,
352- "num_added" : enriched_single_relationship .num_added ,
353- "num_updated" : enriched_single_relationship .num_updated ,
354- "num_removed" : enriched_single_relationship .num_removed ,
355- "num_conflicts" : enriched_single_relationship .num_conflicts ,
356- "contains_conflict" : enriched_single_relationship .contains_conflict ,
357342 },
358343 "conflict_params" : conflict_params ,
359344 "properties" : property_props ,
@@ -375,11 +360,6 @@ def _build_diff_relationship_params(self, enriched_relationship: EnrichedDiffRel
375360 else None ,
376361 "action" : enriched_relationship .action ,
377362 "path_identifier" : enriched_relationship .path_identifier ,
378- "num_added" : enriched_relationship .num_added ,
379- "num_updated" : enriched_relationship .num_updated ,
380- "num_removed" : enriched_relationship .num_removed ,
381- "num_conflicts" : enriched_relationship .num_conflicts ,
382- "contains_conflict" : enriched_relationship .contains_conflict ,
383363 },
384364 "relationships" : single_relationship_props ,
385365 }
@@ -402,11 +382,6 @@ def _build_diff_node_params(self, enriched_node: EnrichedDiffNode) -> dict[str,
402382 "changed_at" : enriched_node .changed_at .to_string () if enriched_node .changed_at else None ,
403383 "action" : enriched_node .action .value ,
404384 "path_identifier" : enriched_node .path_identifier ,
405- "num_added" : enriched_node .num_added ,
406- "num_updated" : enriched_node .num_updated ,
407- "num_removed" : enriched_node .num_removed ,
408- "num_conflicts" : enriched_node .num_conflicts ,
409- "contains_conflict" : enriched_node .contains_conflict ,
410385 },
411386 "conflict_params" : conflict_params ,
412387 "attributes" : attribute_props ,
0 commit comments