File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5440,7 +5440,7 @@ function changeReportPolicy(reportID: string, policyID: string) {
54405440 if ( reportToMove ?. parentReportID && reportToMove ?. parentReportActionID ) {
54415441 const workspaceChatReportID = reportToMove . parentReportID ;
54425442 const reportPreviewActionID = reportToMove . parentReportActionID ;
5443- const oldReportPreviewAction = allReportActions ?. [ ` ${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ workspaceChatReportID } ` ] ?. [ reportPreviewActionID ] ;
5443+ const oldReportPreviewAction = allReportActions ?. [ workspaceChatReportID ] ?. [ reportPreviewActionID ] ;
54445444 const deletedTime = DateUtils . getDBTime ( ) ;
54455445 const firstMessage = Array . isArray ( oldReportPreviewAction ?. message ) ? oldReportPreviewAction . message . at ( 0 ) : null ;
54465446 const updatedReportPreviewAction = {
@@ -5472,7 +5472,14 @@ function changeReportPolicy(reportID: string, policyID: string) {
54725472 failureData . push ( {
54735473 onyxMethod : Onyx . METHOD . MERGE ,
54745474 key : `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ workspaceChatReportID } ` ,
5475- value : { [ reportPreviewActionID ] : oldReportPreviewAction } ,
5475+ value : {
5476+ [ reportPreviewActionID ] : {
5477+ ...oldReportPreviewAction ,
5478+ originalMessage : {
5479+ deleted : null ,
5480+ } ,
5481+ } ,
5482+ } ,
54765483 } ) ;
54775484
54785485 // Update the expense chat report
You can’t perform that action at this time.
0 commit comments