File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,9 +312,9 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
312312 handler : async ( body ) => {
313313 let records = [ ] ;
314314 const primaryKeyColumn = this . resourceConfig . columns . find ( ( col ) => col . primaryKey ) ;
315- for ( const record of body . body . record ) {
316- records . push ( await this . adminforth . resource ( this . resourceConfig . resourceId ) . get ( [ Filters . EQ ( primaryKeyColumn . name , record ) ] ) ) ;
317- records [ records . length - 1 ] . _label = this . resourceConfig . recordLabel ( records [ records . length - 1 ] ) ;
315+ records = await this . adminforth . resource ( this . resourceConfig . resourceId ) . list ( [ Filters . IN ( primaryKeyColumn . name , body . body . record ) ] ) ;
316+ for ( const [ index , record ] of records . entries ( ) ) {
317+ records [ index ] . _label = this . resourceConfig . recordLabel ( records [ index ] ) ;
318318 }
319319 return {
320320 records,
You can’t perform that action at this time.
0 commit comments