Skip to content

Commit

Permalink
Upgrade elasticsearch-dsl.
Browse files Browse the repository at this point in the history
* this will in turn restrict the elasticsearch library to a compatible version
* added unit test for unicode character cohort filtering
  • Loading branch information
dsjen committed Apr 14, 2016
1 parent 0d6f8e4 commit 1fb94dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions analytics_data_api/v0/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def get_users_in_course(
search.query.must.append(Q('multi_match', query=text_search, fields=['name', 'username', 'email']))

# construct the sort hierarchy
search = search.sort(*[
search_request = search.sort(*[
{
sort_policy['order_by']: {
'order': sort_policy['sort_order'],
Expand All @@ -347,7 +347,7 @@ def get_users_in_course(
for sort_policy in sort_policies
])

return search
return search_request

@classmethod
def get_course_metadata(cls, course_id):
Expand Down
3 changes: 3 additions & 0 deletions analytics_data_api/v0/tests/views/test_learners.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

import copy
import datetime
from itertools import groupby
Expand Down Expand Up @@ -272,6 +274,7 @@ def test_data(self):
('cohort', 'a', 'cohort', 'a', True),
('cohort', 'a', 'cohort', '', True),
('cohort', 'a', 'cohort', 'b', False),
('cohort', u'Ich möchte Brot zu essen.', 'cohort', u'Ich möchte Brot zu essen.', True),
('enrollment_mode', 'a', 'enrollment_mode', 'a', True),
('enrollment_mode', 'a', 'enrollment_mode', '', True),
('enrollment_mode', 'a', 'enrollment_mode', 'b', False),
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ djangorestframework==2.4.4 # BSD
django-rest-swagger==0.2.8 # BSD
djangorestframework-csv==1.3.3 # BSD
django-countries==3.2 # MIT
elasticsearch-dsl==0.0.9 # Apache 2.0
elasticsearch-dsl==0.0.11 # Apache 2.0

# markdown is used by swagger for rendering the api docs
Markdown==2.6 # BSD
Expand Down

0 comments on commit 1fb94dd

Please sign in to comment.