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}