From beb9fd2974bce48b5cc1bd33f89dcc658b1752ed Mon Sep 17 00:00:00 2001 From: Nicolay Rusnachenko Date: Mon, 15 Jul 2024 20:37:41 +0100 Subject: [PATCH] #150 related update --- arelight/backend/d3js/relations_graph_operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arelight/backend/d3js/relations_graph_operations.py b/arelight/backend/d3js/relations_graph_operations.py index f042f9b..6a4eb69 100644 --- a/arelight/backend/d3js/relations_graph_operations.py +++ b/arelight/backend/d3js/relations_graph_operations.py @@ -94,9 +94,9 @@ def link_key(link): nodes = [{"id": id, "c": c} for id, c in used_nodes.items()] if operation == OP_DIFFERENCE: - basis = list(set(graph_A["basis"])-set(graph_B["basis"])) + basis = list(set(graph_A["basis"]).difference(graph_B["basis"])) else: - basis = list(set(graph_A["basis"])+set(graph_B["basis"])) + basis = list(set(graph_A["basis"]).union(graph_B["basis"])) equation = "(" + graph_A["equation"] + ")" + OPERATION_MAP[operation] + "(" + graph_B["equation"] + ")" result_graph = {"basis": basis, "equation": equation, "nodes": nodes, "links": links}