Skip to content

Commit

Permalink
[TECH] corrige le type des paramètres du script d'anonymisation d'un …
Browse files Browse the repository at this point in the history
…learner (PIX-15360)

 #10598
  • Loading branch information
pix-service-auto-merge authored Nov 20, 2024
2 parents d0df70b + 2387600 commit f3b2b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class DeleteAndAnonymiseOrgnizationLearnerScript extends Script {
permanent: true,
options: {
organizationLearnerIds: {
type: '<array>number',
type: 'string',
describe: 'a list of comma separated organization learner ids',
demandOption: true,
coerce: commaSeparatedNumberParser(),
Expand All @@ -28,7 +28,6 @@ export class DeleteAndAnonymiseOrgnizationLearnerScript extends Script {
organizationLearnerRepository = { removeByIds },
}) {
const engineeringUserId = process.env.ENGINEERING_USER_ID;

logger.info(`Anonymise ${options.organizationLearnerIds.length} learners`);
await DomainTransaction.execute(async () => {
await campaignParticipationRepository.removeByOrganizationLearnerIds({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ describe('DeleteAndAnonymiseOrgnizationLearnerScript', function () {
const { options } = script.metaInfo;

expect(options.organizationLearnerIds).to.deep.include({
type: '<array>number',
type: 'string',
describe: 'a list of comma separated organization learner ids',
demandOption: true,
});
expect(options.organizationLearnerIds.coerce).to.be.a('function');
});

it('parses list of organizationLearnerIds', async function () {
Expand Down

0 comments on commit f3b2b40

Please sign in to comment.