Skip to content

Commit

Permalink
Added sorting backend & fields in CourseRunSearchViewset haseeb/EDLY-…
Browse files Browse the repository at this point in the history
…2824 (#19)
  • Loading branch information
Muhammad Haseeb authored Apr 29, 2021
1 parent 775eff0 commit 300f452
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions course_discovery/apps/api/v1/views/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ class CourseSearchViewSet(BaseHaystackViewSet):


class CourseRunSearchViewSet(BaseHaystackViewSet):
ordering_fields = ('start', 'id', 'title_override')
filter_backends = [OrderingFilter]
index_models = (CourseRun,)
detail_serializer_class = serializers.CourseRunSearchModelSerializer
facet_serializer_class = serializers.CourseRunFacetSerializer
Expand Down

0 comments on commit 300f452

Please sign in to comment.