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

feat: removable annotations on pagination #145

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

shadinaif
Copy link
Collaborator

@shadinaif shadinaif commented Nov 16, 2024

  • feat: removable annotations on pagination
  • feat: apply removable annotations on applicable querysets
    • avoid using Count if removing the annotation is needed. Use Subquery instead

@shadinaif shadinaif force-pushed the shadinaif/removable-annotations branch from bd75d8b to 370d68b Compare November 16, 2024 16:53
@shadinaif shadinaif marked this pull request as ready for review November 16, 2024 16:54
@shadinaif shadinaif force-pushed the shadinaif/removable-annotations branch from c8817d2 to 2994f33 Compare November 16, 2024 17:05
if active_filter is not None:
q_set = q_set.filter(course_is_active=active_filter)
update_removable_annotations(q_set, not_removable=['course_is_active'])
Copy link
Collaborator Author

@shadinaif shadinaif Nov 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the annotation is being used in a filter, then it's not a removable one!

@shadinaif shadinaif force-pushed the shadinaif/removable-annotations branch 3 times, most recently from 468f0f9 to 36c65cf Compare November 17, 2024 07:21
@shadinaif shadinaif merged commit f4103ef into main Nov 20, 2024
3 checks passed
@shadinaif shadinaif deleted the shadinaif/removable-annotations branch November 20, 2024 06:00
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.

2 participants