Skip to content

Commit

Permalink
fix typo: return an empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonw committed Nov 13, 2023
1 parent f7d37ed commit 49427ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions funlib/persistence/graphs/sqlite_graph_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def read_edges(
nodes = self.read_nodes(roi)

if len(nodes) == 0:
return [{}]
return []

node_ids = ", ".join([str(node["id"]) for node in nodes])
node_condition = f"u IN ({node_ids})"
Expand Down Expand Up @@ -613,7 +613,10 @@ def get_graph(
)
u, v = self.endpoint_names
node_list = [(n["id"], self.__remove_keys(n, ["id"])) for n in nodes]
edge_list = [(e[u], e[v], self.__remove_keys(e, [u, v])) for e in edges]
try:
edge_list = [(e[u], e[v], self.__remove_keys(e, [u, v])) for e in edges]
except KeyError as e:
raise ValueError(edges[:5]) from e
if self.directed:
graph = SQLiteSubDiGraph(self, roi)
else:
Expand Down

0 comments on commit 49427ab

Please sign in to comment.