File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -74,15 +74,16 @@ def _get_function_names(
74
74
if item .get ("Type" ) == "Api" and item_properties .get ("RestApiId" ):
75
75
rest_api = item_properties .get ("RestApiId" )
76
76
api_name = Api .get_rest_api_id_string (rest_api )
77
- if isinstance (api_name , str ):
78
- resource_dict_copy = copy .deepcopy (resource_dict )
79
- function_name = intrinsics_resolver .resolve_parameter_refs (
80
- resource_dict_copy .get ("Properties" , {}).get ("FunctionName" )
81
- )
82
- if function_name :
83
- self .function_names [api_name ] = str (self .function_names .get (api_name , "" )) + str (
84
- function_name
85
- )
77
+ if not isinstance (api_name , str ):
78
+ continue
79
+ raw_function_name = resource_dict .get ("Properties" , {}).get ("FunctionName" )
80
+ resolved_function_name = intrinsics_resolver .resolve_parameter_refs (
81
+ copy .deepcopy (raw_function_name )
82
+ )
83
+ if not resolved_function_name :
84
+ continue
85
+ self .function_names .setdefault (api_name , "" )
86
+ self .function_names [api_name ] += str (resolved_function_name )
86
87
return self .function_names
87
88
88
89
def translate (
You can’t perform that action at this time.
0 commit comments