Skip to content

Commit 83c0924

Browse files
committed
amend asset diagram test again
Signed-off-by: Christian López Barrón <chris.gfz@gmail.com>
1 parent e08fc5e commit 83c0924

File tree

2 files changed

+106
-134
lines changed

2 files changed

+106
-134
lines changed

grill/views/_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,11 @@ def __init__(self, source: _Node, target: _Node, *, edge_data, is_bidirectional=
425425

426426
@property
427427
def _source_port(self):
428-
return self._data.get('source_port_key') or self._data.get('tailport')
428+
return key if (key:=self._data.get('source_port_key')) is not None else self._data.get('tailport')
429429

430430
@property
431431
def _target_port(self):
432-
return self._data.get('target_port_key') or self._data.get('headport')
432+
return key if (key:=self._data.get('target_port_key')) is not None else self._data.get('headport')
433433

434434
def _deactivate_port(self, node, port):
435435
if port is None: # nothing to do

0 commit comments

Comments
 (0)