Skip to content

Commit 373d494

Browse files
committed
feat: Add _has_migration_adapter bool to flobject class
1 parent 41770cf commit 373d494

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/ansys/fluent/core/services/settings.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,17 @@ def get_static_info(self) -> dict[str, Any]:
345345

346346
@_trace
347347
def execute_cmd(self, path: str, command: str, **kwds) -> Any:
348-
"""Execute a given command with the provided keyword arguments."""
348+
"""Execute a given command with the provided keyword arguments.
349+
350+
If `path` is in kwds, rename it to `path_1` to avoid conflict with
351+
the `path` argument.
352+
"""
349353
request = _get_request_instance_for_path(
350354
SettingsModule.ExecuteCommandRequest, path
351355
)
352356
request.command = command
357+
if "path_1" in kwds:
358+
kwds["path"] = kwds.pop("path_1")
353359
self._set_state_from_value(request.args, kwds)
354360

355361
response = self._service_impl.execute_cmd(request)

src/ansys/fluent/core/solver/flobject.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,9 +1498,8 @@ def list_properties(self, object_name):
14981498
object_name : str
14991499
Name of the object whose properties are to be listed.
15001500
"""
1501-
return self._root.list_properties(
1502-
object_path=self.path, object_name=object_name
1503-
)
1501+
# The generated parameter name is path_1 as the name path clashes with existing property.
1502+
return self._root.list_properties(path_1=self.path, name=object_name)
15041503

15051504

15061505
class CombinedNamedObject:
@@ -1763,6 +1762,8 @@ def _execute_command(self, *args, **kwds):
17631762
else:
17641763
print("Please enter 'y[es]' or 'n[o]'.")
17651764
with self._while_executing_command():
1765+
if "path" in kwds:
1766+
kwds["path_1"] = kwds.pop("path")
17661767
ret = self.flproxy.execute_cmd(self._parent.path, self.obj_name, **kwds)
17671768
if (
17681769
not config.disable_parameter_list_return_fix

0 commit comments

Comments
 (0)