Skip to content

Commit db61825

Browse files
committed
Revert "fix original event without repetition in project overview"
This reverts commit d3d61a0.
1 parent af05990 commit db61825

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

src/models/eventsFactory.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)