File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -698,28 +698,28 @@ async def get_list_columns(self, request: Request) -> List[TableColumn]:
698698 if modelfield :
699699 columns .append (await self .get_list_column (request , modelfield ))
700700 # Append operation column
701- actions = await self .get_actions (request , flag = "column" )
702- if actions :
701+ actions = await self .get_actions (request , flag = "column" ) or []
702+ for action in actions :
703703 columns .append (
704704 ColumnOperation (
705- width = 160 ,
706- label = _ ("Operation" ),
705+ label = getattr (action , "label" , _ ("Operation" )),
707706 breakpoint = "*" ,
708- buttons = actions ,
707+ buttons = [ action ] ,
709708 )
710709 )
711710 # Append inline link model column
712711 for link_form in self .link_model_forms :
713712 form = await link_form .get_form_item (request )
714- if form :
715- columns . append (
716- ColumnOperation (
717- width = 160 ,
718- label = link_form . display_admin . page_schema . label ,
719- breakpoint = "*" ,
720- buttons = [ form ] ,
721- )
713+ if not form :
714+ continue
715+ columns . append (
716+ ColumnOperation (
717+ width = 160 ,
718+ label = link_form . display_admin . page_schema . label ,
719+ breakpoint = "*" ,
720+ buttons = [ form ],
722721 )
722+ )
723723 return columns
724724
725725 async def get_list_table_api (self , request : Request ) -> AmisAPI :
You can’t perform that action at this time.
0 commit comments