Set room booking to return from current academic year #4161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just noticed that the room bookings API is still returning booking from the previous academic year and none for the current year.
So for example:
https://uclapi.com/roombookings/bookings?token=uclapi-abcd&start_datetime=2023-09-01
returns:
Whereas:
https://uclapi.com/roombookings/bookings?token=uclapi-abcd&start_datetime=2023-04-01
returns many bookings:
This PR should fix that (assuming the setid format is the same as it used to be)
Maybe in the future this code could be adjusted so that from say the 1st of September on any given year, UCL API automatically flips to the new academic year. And then no manual change is required each year.
β Pull Request checklist
π¨ Is this a breaking change for API clients?
No
π Deploy notes
Worth verifying this works as expected after deploying and after the regular rb dump job runs (if that's still how it works)
cc @zipy124 @shu8
PS: I'm coming back to UCL for a guest lecture on the 29th of November at 2pm in Gustave Tuck LT. Would be cool to see you guys if you're free! Guest lecture will be on using AI to help us build software and my experience with that. Naturally, I'm planning one or more shout outs to UCL API π