-
Notifications
You must be signed in to change notification settings - Fork 30
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
Infinite loop on the get_available_time function #42
Comments
hello @iamfeysal thanks for your report |
@foad-heidari sure. you can please check the below video for more information of the error infinite.loop.mp4 |
Thanks for the information, i will check it. Hopefully it will work for you until it will be fixed |
@iamfeysal okay so your end time is 23:00 and each booking is 1 hour. When the while loop get to 00:00, the if state ment is not working "If (00:00 > 23:00) break" So it will never stop the loop. You can change the code to "If (next_time => booking_settings.end_time) break" And move it one line before updating the next_time |
@foad-heidari yeah, I have been using that since then. it worked only when I set in I hours but I checked the admin optionsform |
@foad-heidari Hello, if I try to edit the
period_of_each_booking
field on theBookingSettings
model toI hour
through the admin and try to access the time in the template when I ran the app, it does not render and instead goes to an infinite loop. I investigated the issue and found out it is coming from theget_available_time
function on theif next_time > booking_settings.end_time: break
section. for some reason, thetime_list
doesn't break becausenext_time
is not greater thanbooking_settings.end_time
. please check it and let me know if it's also occurring on your side and anyone else reading this.The infinite loop only occurs when I set the
period_of_each_booking
field on theBookingSettings
to 1 hour or to 2 hours or to 3 hours in the adminThe text was updated successfully, but these errors were encountered: