@@ -82,7 +82,7 @@ def run(self) -> Any:
8282
8383 def do_custom (self ) -> Any :
8484 class_instance : Union [gitlab .base .RESTManager , gitlab .base .RESTObject ]
85- in_obj = cli .custom_actions [self .cls_name ][self .resource_action ][ 2 ]
85+ in_obj = cli .custom_actions [self .cls_name ][self .resource_action ]. in_object
8686
8787 # Get the object (lazy), then act
8888 if in_obj :
@@ -321,13 +321,13 @@ def _populate_sub_parser_by_class(
321321 id_attr = cls ._id_attr .replace ("_" , "-" )
322322 sub_parser_action .add_argument (f"--{ id_attr } " , required = True )
323323
324- required , optional , dummy = cli .custom_actions [name ][action_name ]
325- for x in required :
324+ custom_action = cli .custom_actions [name ][action_name ]
325+ for x in custom_action . required :
326326 if x != cls ._id_attr :
327327 sub_parser_action .add_argument (
328328 f"--{ x .replace ('_' , '-' )} " , required = True
329329 )
330- for x in optional :
330+ for x in custom_action . optional :
331331 if x != cls ._id_attr :
332332 sub_parser_action .add_argument (
333333 f"--{ x .replace ('_' , '-' )} " , required = False
@@ -350,13 +350,13 @@ def _populate_sub_parser_by_class(
350350 )
351351 sub_parser_action .add_argument ("--sudo" , required = False )
352352
353- required , optional , dummy = cli .custom_actions [name ][action_name ]
354- for x in required :
353+ custom_action = cli .custom_actions [name ][action_name ]
354+ for x in custom_action . required :
355355 if x != cls ._id_attr :
356356 sub_parser_action .add_argument (
357357 f"--{ x .replace ('_' , '-' )} " , required = True
358358 )
359- for x in optional :
359+ for x in custom_action . optional :
360360 if x != cls ._id_attr :
361361 sub_parser_action .add_argument (
362362 f"--{ x .replace ('_' , '-' )} " , required = False
0 commit comments