File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -232,19 +232,11 @@ export default class ImportExport extends AdminForthPlugin {
232232 const { data } = body ;
233233
234234 const primaryKeyColumn = this . resourceConfig . columns . find ( col => col . primaryKey ) ;
235- if ( ! primaryKeyColumn ) {
236- return {
237- ok : true ,
238- total : Object . values ( data ) [ 0 ] . length ,
239- existingCount : 0 ,
240- newCount : Object . values ( data ) [ 0 ] . length
241- } ;
242- }
243235
244236 const rows = [ ] ;
245237 const columns = Object . keys ( data ) ;
246238 const columnValues = Object . values ( data ) ;
247- for ( let i = 0 ; i < columnValues [ 0 ] . length ; i ++ ) {
239+ for ( let i = 0 ; i < ( columnValues [ 0 ] as any [ ] ) . length ; i ++ ) {
248240 const row = { } ;
249241 for ( let j = 0 ; j < columns . length ; j ++ ) {
250242 row [ columns [ j ] ] = columnValues [ j ] [ i ] ;
You can’t perform that action at this time.
0 commit comments