Commit a88b42a8 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

BC: Fix get_assoc_to_node in case of no results.

Showing with 6 additions and 1 deletion
+6 -1
......@@ -91,9 +91,14 @@ class BoundaryConditionList(PamhyrModelListWithTab):
return copy(self)
def get_assoc_to_node(self, tab, node):
return next(
assoc = list(
filter(
lambda i: i.node is node,
self._tabs[tab]
)
)
if len(assoc) > 0:
return assoc[0]
return None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment