Skip to content

Conversation

@bcb37
Copy link
Collaborator

@bcb37 bcb37 commented Jun 18, 2024

No description provided.

@bcb37 bcb37 marked this pull request as draft June 18, 2024 20:15
@bcb37 bcb37 marked this pull request as ready for review June 18, 2024 20:15
} else {
csvExportData = await this.analyticsRepository.getCSVDataForSimpleExport(experimentId, skip, take);
}
const userIds = csvExportData.map(({ userId }) => userId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this part of code removed? We will still execute further code if no data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part was removed because 'break' doesn't make sense outside of a loop.
If the experimentId parameter is undefined then we probably should return immediately.
If there's an experiment with no enrolled students we'll return then

.execute();
.where('"individualEnrollment"."experimentId" = :experimentId', { experimentId });

console.log(query.getSql());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this console log and the separate constant query created to log it.

@bcb37 bcb37 requested a review from ppratikcr7 June 20, 2024 18:24
@bcb37 bcb37 merged commit e365557 into release/v5.1 Jun 21, 2024
@bcb37 bcb37 deleted the remove-export-pagination branch June 21, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants