@@ -37,8 +37,6 @@ def update_runtime_function_definition(runtime_function_definition, t)
3737 runtime_name : runtime_function_definition . runtime_name
3838 )
3939 db_object . removed_at = nil
40- db_object . parameters = update_parameters ( db_object , runtime_function_definition . runtime_parameter_definitions ,
41- db_object . parameters , t )
4240 db_object . return_type = if runtime_function_definition . return_type_identifier . present?
4341 find_data_type_identifier ( runtime_function_definition . return_type_identifier ,
4442 runtime_function_definition . generic_mappers , t )
@@ -51,7 +49,6 @@ def update_runtime_function_definition(runtime_function_definition, t)
5149 db_object . deprecation_messages )
5250
5351 db_object . error_types = update_error_types ( runtime_function_definition . error_type_identifiers , db_object , t )
54- db_object . generic_mappers = update_mappers ( runtime_function_definition . generic_mappers , db_object , t )
5552
5653 if db_object . function_definitions . empty?
5754 definition = FunctionDefinition . new
@@ -64,6 +61,11 @@ def update_runtime_function_definition(runtime_function_definition, t)
6461
6562 db_object . function_definitions << definition
6663 end
64+
65+ db_object . parameters = update_parameters ( db_object , runtime_function_definition . runtime_parameter_definitions ,
66+ db_object . parameters , t )
67+ db_object . generic_mappers = update_mappers ( runtime_function_definition . generic_mappers , db_object , t )
68+
6769 db_object . save
6870 db_object
6971 end
@@ -199,6 +201,7 @@ def update_parameters(runtime_function_definition, parameters, db_parameters, t)
199201 definition . documentations = update_translations ( real_param . documentation , definition . documentations )
200202 definition . data_type = db_param . data_type
201203 definition . default_value = db_param . default_value
204+ definition . function_definition = runtime_function_definition . function_definitions . first
202205
203206 db_param . parameter_definitions << definition
204207 end
0 commit comments