Skip to content

Commit

Permalink
chore: remove try-except when running filter
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanttV committed Dec 12, 2024
1 parent beb7fe6 commit 224fcaf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions openedx/core/djangoapps/schedules/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,9 @@ 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
# .. filter_implemented_name: ScheduleQuerySetRequested
# .. filter_type: org.openedx.learning.schedule.queryset.requested.v1
schedules = ScheduleQuerySetRequested.run_filter(schedules)

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

0 comments on commit 224fcaf

Please sign in to comment.