Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Logic for filtering via age is wrong] #218

Open
sumit7 opened this issue May 25, 2021 · 8 comments
Open

[Logic for filtering via age is wrong] #218

sumit7 opened this issue May 25, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@sumit7
Copy link

sumit7 commented May 25, 2021

and (session['min_age_limit'] <= min_age_booking)\

In viable_options() function if checks for session[min_age_limit]< min_age_booking.
But in case of booking for people above 45yers, it will accept bth 45yrs and 18-44yrs sessions as viable.

@pallupz
Copy link
Owner

pallupz commented May 26, 2021

Ohk.. 45+ people cant book for 18+ locations?

@pallupz
Copy link
Owner

pallupz commented May 26, 2021

I thought that was one way restriction

@sumit7
Copy link
Author

sumit7 commented May 26, 2021

No it is 18-44 and then 45+
I guess the min_age_limit is a misnomer

@pallupz
Copy link
Owner

pallupz commented May 26, 2021

Okay.. I will try to get to it in the weekend. Or if you'd like to submit a PR, that's okay with me too. If you do, please do raise to bug/min_age branch.

@pallupz pallupz added the bug Something isn't working label May 26, 2021
@pallupz
Copy link
Owner

pallupz commented May 29, 2021

Hi @sumit7 - Could you share the error you get when trying to book for 45+ beneficiary in a 18+ center?

@sumit7
Copy link
Author

sumit7 commented May 29, 2021

@pallupz Hey sorry for the late reply.
45_trying_to_book_in18_center_error.txt

@sumit7
Copy link
Author

sumit7 commented May 29, 2021

================================= ATTEMPTING BOOKING ==================================================
Booking Response Code: 400
Booking Response : {"errorCode":"APPOIN0043","error":"Minimum age criteria is 18 years and maximum age 44 for this center"}
Response: 400 : {"errorCode":"APPOIN0043","error":"Minimum age criteria is 18 years and maximum age 44 for this center"}

@mrms123
Copy link

mrms123 commented Jun 4, 2021

This seems to be a new restriction, so yes, the code needs to be modified

When I had written this condition - I had explicitly tested for this case.
Also - I was also dumping the session info to a database - it looks like the max_age is a new field - it's not in the API responses I received back then/

Thanks for pointing it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants