Skip to content

Commit 9e12930

Browse files
committed
fix logic issue
1 parent d3554fe commit 9e12930

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ansys/systemcoupling/core/adaptor/impl/injected_commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,9 @@ def _get_interface_and_transfer_names(
318318
interface_names = setup.coupling_interface.get_object_names()
319319

320320
if transfer_names is not None:
321-
# There must be a single interface in this case or interface_name must be specified
322-
if len(interface_names) != 1 or interface_name is not None:
321+
# There must be a single interface in this case.
322+
# Either interface_names has length 1 or interface_name must be specified
323+
if len(interface_names) != 1 and interface_name is None:
323324
raise RuntimeError(
324325
"'transfer_names' cannot be used when there is more than "
325326
"one interface and 'interface_name' is not specified."

0 commit comments

Comments
 (0)