bugfix: only allow results that are within specified season/year and nulls#448
Merged
Conversation
pushrbx
requested changes
Oct 23, 2023
Collaborator
There was a problem hiding this comment.
I tried to add my comments in top down order, so you would read them after each other and they are connected.
In summary:
getSeasonItemsfunction ofQueryAnimeSeasonHandlerBaseclass should not changegetAiredBetweenfunction inAnimeRepositoryclass 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 aroundgetAiredBetweenand 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:springyear:2023
then the query should first consider the premiered string then the aired date range based on the resolved date range.
Contributor
Author
I tested this but So I added |
pushrbx
requested changes
Oct 25, 2023
pushrbx
approved these changes
Nov 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
premieredset to null)start_dateandend_date(Existing behavior)