File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -337,10 +337,7 @@ class EventsFactory extends Factory {
337337 $unwind : '$event' ,
338338 } ,
339339 {
340- $unwind : {
341- path : '$repetition' ,
342- preserveNullAndEmptyArrays : true ,
343- } ,
340+ $unwind : '$repetition' ,
344341 } ,
345342 {
346343 $match : {
@@ -373,21 +370,7 @@ class EventsFactory extends Factory {
373370 const repetition = dailyEvent . repetition ;
374371 const event = dailyEvent . event ;
375372
376- /**
377- * In case of repetition we need to compose event with repetition
378- * Otherwise we need to put original event with originalTimestamp and originalEventId
379- */
380- if ( repetition ) {
381- dailyEvent . event = this . _composeEventWithRepetition ( event , repetition ) ;
382- } else {
383- dailyEvent . event = {
384- ...event ,
385- originalTimestamp : event . timestamp ,
386- originalEventId : event . _id ,
387- projectId : this . projectId ,
388- } ;
389- }
390-
373+ dailyEvent . event = this . _composeEventWithRepetition ( event , repetition ) ;
391374 dailyEvent . id = dailyEvent . _id . toString ( ) ;
392375
393376 delete dailyEvent . repetition ;
You can’t perform that action at this time.
0 commit comments