Skip to content

Commit 295e4df

Browse files
PProfiziBClappe
authored andcommitted
fix(any): fix cast of Any to DataSources
1 parent 7db63f1 commit 295e4df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ansys/dpf/core/any.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def _type_to_new_from_get_as_method(self, obj):
113113
from ansys.dpf.core import (
114114
collection,
115115
custom_type_field,
116+
data_sources,
116117
data_tree,
117118
dpf_operator,
118119
field,
@@ -205,6 +206,11 @@ def _type_to_new_from_get_as_method(self, obj):
205206
self._api.any_new_from_operator,
206207
self._api.any_get_as_operator,
207208
)
209+
elif issubclass(obj, data_sources.DataSources):
210+
return (
211+
self._api.any_new_from_data_sources,
212+
self._api.any_get_as_data_sources,
213+
)
208214
elif issubclass(obj, Any):
209215
return (
210216
lambda x: x,

0 commit comments

Comments
 (0)