Closed ghost closed 3 years ago
Are you able to get the list of beneficiaries? Does all the beneficiaries that you are trying book have the same vaccination status?
new code has messed it up somewhere.
There were a bunch of PRs merged yesterday. The problem is that we cannot test these changes thoroughly, so any change introduces bugs
Yeah sorry about that. I missed one corner case where beneficiaries have different vacc status. As a suggestion, I think from now on we should submit our pr into a different branch (lets say dev) rather than the main and only after testing it thoroughly we should rebase it to main
some kind of unethical way to test is to register a "fake" beneficiary, as cowin do allow to add anyone and cancel the appointments later on. They don't verify any IDs except PAN while registering.
some kind of unethical way to test is to register a "fake" beneficiary, as cowin do allow to add anyone and cancel the appointments later on. They don't verify any IDs except PAN while registering.
Yeah true, thats how I tested it yesterday.
@Nakul93 Could you please fix the corner-case and raise a PR?
@bombardier-gif Already did. Its in #272
merged. @gitmnj Can you please re open this issue if you see the problem again?
@bombardier-gif Already did. Its in #272
Ideally you should make it a separate PR for bugs so that its easy to revert in case of a problem.
@bombardier-gif Already did. Its in #272
Ideally you should make it a separate PR for bugs so that its easy to revert in case of a problem.
Agree, will do that from next time. And also we should have separate branches for features/enhancements and main branch should only be used for bug fixes
i guess you can simply do something like this
`def vaccine_dose2_duedate(vaccine_type, dose1_date):
if vaccine_type == "COVISHIELD":
dose1 = datetime.datetime.strptime(dose1_date, "%d-%m-%Y")
covishield_due_date = dose1 + datetime.timedelta(84)
return covishield_due_date
elif vaccine_type == "COVAXIN":
dose1 = datetime.datetime.strptime(dose1_date, "%d-%m-%Y")
covaxin_due_date = dose1 + datetime.timedelta(28)
return covaxin_due_date
elif vaccine_type == "SPUTNIK V":
dose1 = datetime.datetime.strptime(dose1_date, "%d-%m-%Y")
sputnikV_due_date = dose1 + datetime.timedelta(21)
return sputnikV_due_date`
and inside get beneficiaries
if beneficiary["vaccination_status"] == "Partially Vaccinated" : dose2_date_calculated = vaccine_dose2_duedate(beneficiary["vaccine"], beneficiary["dose1_date"]) beneficiary["dose2_date"] = dose2_date_calculated
Fetching registered beneficiaries.. 'dose2_due_date' Exiting Script
generating token but after that not working