Skip to content

Commit 849d50f

Browse files
fix: updated Workflow.get_topology() to use derived classes
1 parent e75cfbc commit 849d50f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/ansys/dpf/core/dpf_operator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ def _type_to_output_method(self):
370370
collection_base,
371371
any,
372372
)
373+
from ansys.dpf.core.workflow_topology import workflow_topology
373374

374375
out = [
375376
(any.Any, self._api.operator_getoutput_as_any),
@@ -466,6 +467,11 @@ def _type_to_output_method(self):
466467
self._api.operator_getoutput_as_any,
467468
lambda obj, type: any.Any(server=self._server, any_dpf=obj).cast(type),
468469
),
470+
(
471+
workflow_topology.WorkflowTopology,
472+
None,
473+
"WorkflowTopology",
474+
),
469475
]
470476
if hasattr(self._api, "operator_getoutput_generic_data_container"):
471477
out.append(

src/ansys/dpf/core/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ def get_topology(self):
959959
workflow_to_workflow_topology_op.inputs.workflow.connect(self)
960960
workflow_topology_container = workflow_to_workflow_topology_op.outputs.workflow_topology()
961961

962-
return WorkflowTopology(workflow_topology_container)
962+
return workflow_topology_container
963963

964964
def __del__(self):
965965
try:

0 commit comments

Comments
 (0)