Skip to content

Commit

Permalink
feat: add schedule queryset request filter integration
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanttV committed Dec 6, 2024
1 parent 3196ceb commit aef53ab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions openedx/core/djangoapps/schedules/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from edx_ace.recipient import Recipient
from edx_ace.recipient_resolver import RecipientResolver
from edx_django_utils.monitoring import function_trace, set_custom_attribute
from openedx_filters.learning.filters import ScheduleQuerySetRequested

from lms.djangoapps.courseware.utils import verified_upgrade_deadline_link, can_show_verified_upgrade
from lms.djangoapps.discussion.notification_prefs.views import UsernameCipher
Expand Down Expand Up @@ -154,6 +155,13 @@ def get_schedules_with_target_date_by_bin_and_orgs(

schedules = self.filter_by_org(schedules)

try:
# .. filter_implemented_name: ScheduleQuerySetRequested
# .. filter_type: org.openedx.learning.schedule.queryset.requested.v1
schedules = ScheduleQuerySetRequested.run_filter(schedules)
except ScheduleQuerySetRequested.PreventScheduleQuerysetRequest as exc:
schedules = exc.schedules

if "read_replica" in settings.DATABASES:
schedules = schedules.using("read_replica")

Expand Down

0 comments on commit aef53ab

Please sign in to comment.