Skip to content

Commit

Permalink
[TECH] Ajouter "ORDER BY id" sur une requête dans le script de partag…
Browse files Browse the repository at this point in the history
…e de profil (PIX-16342)

 #11277
  • Loading branch information
pix-service-auto-merge authored Jan 30, 2025
2 parents 84a1aef + 566a15e commit 1ff0db9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/profile/scripts/sixth-grade-organization-share.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class SixthGradeOrganizationShare extends Script {
*/
async fetchProfileRewards(limit, offset) {
const knexConnection = DomainTransaction.getConnection();
return await knexConnection('profile-rewards').select('userId', 'id').limit(limit).offset(offset);
return await knexConnection('profile-rewards').select('userId', 'id').limit(limit).offset(offset).orderBy('id');
}

async fetchUserOrganizations(userId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Integration | Profile | Scripts | sixth-grade-organization-share ', f
databaseBuilder.factory.buildOrganizationLearner({ organizationId: firstOrganizationId, userId }),
);

// build an other organization learner for userId 3
// build another organization learner for userId 3
databaseBuilder.factory.buildOrganizationLearner({ organizationId: secondOrganizationId, userId: 3 });

// build profile rewards
Expand Down

0 comments on commit 1ff0db9

Please sign in to comment.