File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/components/product/handlers Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ export class ExtractProductsFromPnpHandler
48
48
event instanceof EngagementCreatedEvent
49
49
? event . engagement
50
50
: event . updated ;
51
- const pnpFileId = event . input . pnp ?. uploadId ;
52
- const { methodology } = event . input ;
53
- if ( ! pnpFileId || ! methodology ) {
51
+ const { pnp : hasPnpInput , methodology } = event . input ;
52
+ if ( ! hasPnpInput || ! methodology ) {
54
53
return ;
55
54
}
56
55
57
- const file = this . files . asDownloadable ( { id : pnpFileId } , pnpFileId ) ;
56
+ const pnp = await this . files . getFile ( engagement . pnp , event . session ) ;
57
+ const file = this . files . asDownloadable ( { } , pnp . latestVersionId ) ;
58
58
59
59
const availableSteps = getAvailableSteps ( {
60
60
methodology,
@@ -64,7 +64,7 @@ export class ExtractProductsFromPnpHandler
64
64
productRows = await this . extractor . extract ( file , availableSteps ) ;
65
65
} catch ( e ) {
66
66
this . logger . warning ( e . message , {
67
- id : file . id ,
67
+ id : pnp . latestVersionId ,
68
68
exception : e ,
69
69
} ) ;
70
70
return ;
You can’t perform that action at this time.
0 commit comments