Skip to content
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

LINK-2203 | fix(events): use django qs functions in max_* and min_duration filters #1007

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

nicobav
Copy link
Contributor

@nicobav nicobav commented Oct 30, 2024

There were ProgrammingError thrown when using max or min_duration filter with hide_recurring_children filter. This was because the min_* and max_duration filters were defined to use custom sql WHERE clauses without referring to which table the fields in the WHERE clause was referring to and there were other tables joined to the query by hide_recurring_children filter.

Solution was to convert these max and min_duration filters to be using django qs functions.

Also refactors the max_ and min_duration filters away from api.py to filters.

Refs LINK-2203

@nicobav nicobav requested a review from a team October 30, 2024 12:16
@terovirtanen
Copy link
Contributor

LINKEDEVENTS-API branch is deployed to platta: https://linkedevents-pr1007.api.dev.hel.ninja 🚀🚀🚀

@nicobav nicobav force-pushed the LINK-2203/max-dur-hide-rec-err branch from 9a65116 to b657d02 Compare October 31, 2024 08:21
There were 'ProgrammingError' thrown when using max or min_duration
filter with hide_recurring_children filter. This was because the
*_duration filters were defined to use custom sql WHERE clauses without
referring to which table the fields in the WHERE clause was referring to
and there were other tables joined to the query by hide_recurring_
children filter.

Solution was to convert these max and min_duration filters to be using
django qs functions.

Also refactors the max_ and min_duration filters away from api.py to
filters.

Refs LINK-2203
@nicobav nicobav force-pushed the LINK-2203/max-dur-hide-rec-err branch from b657d02 to a41cee0 Compare October 31, 2024 11:25
Copy link

sonarcloud bot commented Oct 31, 2024

@nicobav nicobav merged commit 07b27b3 into main Oct 31, 2024
16 of 18 checks passed
@nicobav nicobav deleted the LINK-2203/max-dur-hide-rec-err branch October 31, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants