mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
BC: Fix get_assoc_to_node in case of no results.
This commit is contained in:
1 parent
08f01aee69
commit
a88b42a8ef
1 file changed
+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
|
||||
Reference in new issue
Block a user