Ticket: Projection--does not give the validation code

Hello,
I have tried the ticket projection test, and it works

But when I go to the application and request the validation code, it gives me error

Does anyone know what’s up with this?

Hi @Juan_Carlos_Pazmino,

That should not have happened :thinking: Are you still facing the issue? If yes, let me know I will send you a direct message to share the code and we can figure out the cause of this.

Kanika

1 Like

Good morning, I just tried and the same thing keeps happening … tell me what to do

Sending you message.

Kanika

The number expected by the test is 505.
This 505 number is set in the compiled file:

build/static/js/main.de4ec786.chunk.js

but the number of records in sample_mflix.movies collection is 1468
.filter({ countries: {$in: [ ‘Russia’, ‘Japan’, ‘Mexico’ ]} })
.project({title: 1})

and with Jest, the test passes, but not in the app-status page:
http://localhost:5000/status/

May be an old compilation.

Actually I edited (not trying to cheat, but to test my hypothesis and it was right, changing 505 to 1468 in this file:

build/static/js/main.de4ec786.chunk.js

by doing this, it made that the status finally dumps out the success code.

I am not sure if this is the right way. I am able to pass projection ticket without editing 505 to 1468

Kanika

1 Like

Is not the right way to edit the file, but this filter, as required, throws 1468:

.filter({ countries: {$in: [ ‘Russia’, ‘Japan’, ‘Mexico’ ]} })
or just the next direct in Compass or shell:
{ countries: {$in: [ ‘Russia’, ‘Japan’, ‘Mexico’ ]} }

Is not the goal to enforce value to fit in, but the number of records with countries-field filtered to [ ‘Russia’, ‘Japan’, ‘Mexico’ ] is 1468.

Is the requirement to have at least one or all of them?

1 Like