Fix vertex building error and improve vertex data comparison
This commit is contained in:
parent
c786e9970d
commit
1df99008a1
2 changed files with 5 additions and 1 deletions
|
|
@ -162,7 +162,10 @@ class Graph:
|
||||||
self.edges = new_edges
|
self.edges = new_edges
|
||||||
|
|
||||||
def vertex_data_is_identical(self, vertex: Vertex, other_vertex: Vertex) -> bool:
|
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:
|
def vertex_edges_are_identical(self, vertex: Vertex, other_vertex: Vertex) -> bool:
|
||||||
same_length = len(vertex.edges) == len(other_vertex.edges)
|
same_length = len(vertex.edges) == len(other_vertex.edges)
|
||||||
|
|
|
||||||
|
|
@ -516,6 +516,7 @@ class Vertex:
|
||||||
self._update_built_object_and_artifacts(result)
|
self._update_built_object_and_artifacts(result)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.exception(exc)
|
logger.exception(exc)
|
||||||
|
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Error building node {self.display_name}: {str(exc)}"
|
f"Error building node {self.display_name}: {str(exc)}"
|
||||||
) from exc
|
) from exc
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue