Fix vertex building error and improve vertex data comparison

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-26 23:03:16 -03:00
commit 1df99008a1
2 changed files with 5 additions and 1 deletions

View file

@ -162,7 +162,10 @@ class Graph:
self.edges = new_edges
def vertex_data_is_identical(self, vertex: Vertex, other_vertex: Vertex) -> bool:
return vertex.__repr__() == other_vertex.__repr__()
data_is_equivalent = vertex.__repr__() == other_vertex.__repr__()
if not data_is_equivalent:
return False
return self.vertex_edges_are_identical(vertex, other_vertex)
def vertex_edges_are_identical(self, vertex: Vertex, other_vertex: Vertex) -> bool:
same_length = len(vertex.edges) == len(other_vertex.edges)

View file

@ -516,6 +516,7 @@ class Vertex:
self._update_built_object_and_artifacts(result)
except Exception as exc:
logger.exception(exc)
raise ValueError(
f"Error building node {self.display_name}: {str(exc)}"
) from exc