Closed Voulz closed 1 year ago
Thanks for the PR. Just some minor comments to address.
Thanks for the code review, I fixed the code as you mentioned. I have been doing too much C++ lately...
i edited it like you described and even updated the code you updated even deleted the settings file and when i run run_enroller.py i always get already enrolled and i don't ever get successfully enrolled again and i don't get new courses what should i do? @cullzie @Voulz anybody please?
Hey @Oka4444 Could you please open a separate ticket with full details of the issue you are having. Thanks
For some reason, the for loop is up to total_pages +2 and not total_pages +1. Instead of going this route, I saw that the response contains a "next" key which is None when there is no next page to load, so I replaced the for loop with a while loop which fixed my issue.
Description
As described in the issue I created earlier, sometimes the code tries to reach a page with my courses that does not exist. I had a look at the code and for some reason, the for loop is up to total_pages +2 and not total_pages +1. Instead of going this route, I saw that the response contains a "next" key which is None when there is no next page to load, so I replaced the for loop with a while loop which fixed my issue.
Fixes #405
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I only tested on my machine and I was able to enroll in new courses since.
Checklist: