Skip to content

Commit 48993dd

Browse files
committed
Fixed order_by
1 parent d8567f1 commit 48993dd

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ before_install:
2222
install:
2323
- |
2424
if [ "$TEST_TYPE" = build ]; then
25-
pip install pytest==3.0.2 pytest-cov pytest-benchmark coveralls six pytest-django==2.9.1 mock django-filter
2625
pip install django==$DJANGO_VERSION
26+
pip install pytest==3.0.2 pytest-cov pytest-benchmark coveralls six pytest-django==2.9.1 mock
27+
pip install django==$DJANGO_FILTER_VERSION
2728
pip install -e .
2829
python setup.py develop
2930
elif [ "$TEST_TYPE" = lint ]; then
@@ -45,18 +46,18 @@ after_success:
4546
fi
4647
env:
4748
matrix:
48-
- TEST_TYPE=build
49+
- TEST_TYPE=build DJANGO_VERSION=1.10 DJANGO_FILTER_VERSION=1.0.0
4950
matrix:
5051
fast_finish: true
5152
include:
5253
- python: '2.7'
53-
env: TEST_TYPE=build DJANGO_VERSION=1.6
54+
env: TEST_TYPE=build DJANGO_VERSION=1.6 DJANGO_FILTER_VERSION=0.15.3
5455
- python: '2.7'
55-
env: TEST_TYPE=build DJANGO_VERSION=1.7
56+
env: TEST_TYPE=build DJANGO_VERSION=1.7 DJANGO_FILTER_VERSION=0.15.3
5657
- python: '2.7'
57-
env: TEST_TYPE=build DJANGO_VERSION=1.8
58+
env: TEST_TYPE=build DJANGO_VERSION=1.8 DJANGO_FILTER_VERSION=0.15.3
5859
- python: '2.7'
59-
env: TEST_TYPE=build DJANGO_VERSION=1.9
60+
env: TEST_TYPE=build DJANGO_VERSION=1.9 DJANGO_FILTER_VERSION=1.0.0
6061
- python: '2.7'
6162
env: TEST_TYPE=lint
6263
deploy:

graphene_django/filter/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_filtering_args_from_filterset(filterset_class, type):
1919
args[name] = field_type
2020

2121
# Also add the 'order_by' field
22-
if filterset_class._meta.order_by:
22+
if getattr(filterset_class._meta, 'order_by', None):
2323
args[filterset_class.order_by_field] = String()
2424

2525
return args

0 commit comments

Comments
 (0)