-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
bugfix: only allow results that are within specified season/year and nulls #448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to add my comments in top down order, so you would read them after each other and they are connected.
In summary:
getSeasonItems
function ofQueryAnimeSeasonHandlerBase
class should not changegetAiredBetween
function inAnimeRepository
class should handle the edge case if "premiered" date should always take precedence. Ideally this function should have the business logic to handle the situation. I would also add a new function maybe with the arguments you added, which wraps aroundgetAiredBetween
and adds the extra filters based on premiered, if it's possible to override the query builder that way. (haven't checked yet)- Existing behaviour of resolving season based on date, and the current way of resolving request params to a date range should remain as is. We would want to deal with the inconsistency at the database query level: if request was for
season:spring
year:2023
then the query should first consider the premiered string then the aired date range based on the resolved date range.
I tested this but So I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it looks ok.
Issue/Discussion: https://discord.com/channels/460491088004907029/1119461866322800662
There are a handful of entries like 52991 start on September 29th which is technically in the range of the summer season (which is why it returns in the results for summer 2023). However, it's officially listed under the Fall season in
premiered
.This PR attempts to resolve this issue by filtering down the results to
premiered
set to null)start_date
andend_date
(Existing behavior)