From 7c9e5134783939eca3c877ef638810c03d4f81d7 Mon Sep 17 00:00:00 2001 From: aronnoordam Date: Tue, 21 Jan 2025 13:07:13 +0100 Subject: [PATCH] moved isinstance to if statement --- .../python_scripts/set_parameter_field_process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/GeoMechanicsApplication/python_scripts/set_parameter_field_process.py b/applications/GeoMechanicsApplication/python_scripts/set_parameter_field_process.py index c81bccb9da0..c8b1a77c73b 100644 --- a/applications/GeoMechanicsApplication/python_scripts/set_parameter_field_process.py +++ b/applications/GeoMechanicsApplication/python_scripts/set_parameter_field_process.py @@ -43,8 +43,8 @@ def __init__(self, Model, settings ): self.params.AddValue("func_type", settings["func_type"]) self.params.AddValue("function", settings["function"]) self.params.AddValue("dataset", settings["dataset"]) - is_variable_vector_type = isinstance(self.GetVariableBasedOnString(), KratosMultiphysics.VectorVariable) - if "input" in settings["func_type"].GetString() and is_variable_vector_type: + if ("input" in settings["func_type"].GetString() and + isinstance(self.GetVariableBasedOnString(), KratosMultiphysics.VectorVariable)): self.params.AddValue("vector_variable_indices", settings["vector_variable_indices"]) if "json_file" in settings["func_type"].GetString(): self.params.AddValue("dataset_file_name", settings["dataset_file_name"])