diff --git a/src/ansys/fluent/core/solver/flobject.py b/src/ansys/fluent/core/solver/flobject.py index 8939939d64e..674339f3251 100644 --- a/src/ansys/fluent/core/solver/flobject.py +++ b/src/ansys/fluent/core/solver/flobject.py @@ -1750,13 +1750,13 @@ def __call__(self, *args, **kwds): raise KeyboardInterrupt -# TODO: Remove this after paremater list() method is fixed from Fluent side +# TODO: Remove this after parameter list() method is fixed from Fluent side def _fix_parameter_list_return(val): if isinstance(val, dict): new_val = {} for name, v in val.items(): value, units = v - if len(units) > 0: + if len(units) > 0 and isinstance(units[0], str): unit_labels = _fix_parameter_list_return.scheme_eval( f"(units/inquire-available-label-strings-for-quantity '{units[0]})" ) diff --git a/tests/parametric/test_parametric_workflow.py b/tests/parametric/test_parametric_workflow.py index f582852b96c..db1ae10fef3 100644 --- a/tests/parametric/test_parametric_workflow.py +++ b/tests/parametric/test_parametric_workflow.py @@ -255,6 +255,15 @@ def test_parameters_list_function(static_mixer_settings_session): create_output_param("report-definition", "outlet-temp-avg") create_output_param("report-definition", "outlet-vel-avg") + # Create a unitless output parameter + unitless_quantity = solver.settings.solution.report_definitions.surface.create( + "temp-outlet-uniformity" + ) + unitless_quantity.report_type = "surface-masswtui" + unitless_quantity.field = "temperature" + unitless_quantity.surface_names = ["outlet"] + unitless_quantity.output_parameter = True + input_parameters_list = solver.parameters.input_parameters.list() output_parameters_list = solver.parameters.output_parameters.list() assert input_parameters_list == { @@ -266,4 +275,5 @@ def test_parameters_list_function(static_mixer_settings_session): assert output_parameters_list == { "outlet-temp-avg-op": [0.0, "K"], "outlet-vel-avg-op": [0.0, "m/s"], + "temp-outlet-uniformity-op": [0.0, ""], }