File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -625,7 +625,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
625625 if ( oldRecord [ value ] ) {
626626 // put tag to delete old file
627627 try {
628- await columnPlugin . pluginOptions . storageAdapter . markKeyForDeletation ( oldRecord [ value ] ) ;
628+ if ( columnPlugin . pluginOptions . storageAdapter . markKeyForDeletion !== undefined ) {
629+ await columnPlugin . pluginOptions . storageAdapter . markKeyForDeletion ( oldRecord [ value ] ) ;
630+ } else {
631+ await columnPlugin . pluginOptions . storageAdapter . markKeyForDeletation ( oldRecord [ value ] ) ;
632+ }
629633 } catch ( e ) {
630634 // file might be e.g. already deleted, so we catch error
631635 console . error ( `Error setting tag to true for object ${ oldRecord [ value ] } . File will not be auto-cleaned up` ) ;
@@ -634,7 +638,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
634638 if ( fieldsToUpdate [ idx ] [ value ] && fieldsToUpdate [ idx ] [ value ] !== null ) {
635639 // remove tag from new file
636640 // in this case we let it crash if it fails: this is a new file which just was uploaded.
637- await columnPlugin . pluginOptions . storageAdapter . markKeyForNotDeletation ( fieldsToUpdate [ idx ] [ value ] ) ;
641+ if ( columnPlugin . pluginOptions . storageAdapter . markKeyForNotDeletion !== undefined ) {
642+ await columnPlugin . pluginOptions . storageAdapter . markKeyForNotDeletion ( fieldsToUpdate [ idx ] [ value ] ) ;
643+ } else {
644+ await columnPlugin . pluginOptions . storageAdapter . markKeyForNotDeletation ( fieldsToUpdate [ idx ] [ value ] ) ;
645+ }
638646 }
639647 }
640648 }
Original file line number Diff line number Diff line change 2727 },
2828 "dependencies" : {
2929 "@types/handlebars" : " ^4.0.40" ,
30- "adminforth" : " ^2.4.0-next.222 " ,
30+ "adminforth" : " ^2.4.0-next.315 " ,
3131 "handlebars" : " ^4.7.8"
3232 },
3333 "release" : {
You can’t perform that action at this time.
0 commit comments