mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-22 17:47:12 +03:00
Fixed order_by
This commit is contained in:
parent
d8567f1c58
commit
48993ddca0
13
.travis.yml
13
.travis.yml
|
@ -22,8 +22,9 @@ before_install:
|
|||
install:
|
||||
- |
|
||||
if [ "$TEST_TYPE" = build ]; then
|
||||
pip install pytest==3.0.2 pytest-cov pytest-benchmark coveralls six pytest-django==2.9.1 mock django-filter
|
||||
pip install django==$DJANGO_VERSION
|
||||
pip install pytest==3.0.2 pytest-cov pytest-benchmark coveralls six pytest-django==2.9.1 mock
|
||||
pip install django==$DJANGO_FILTER_VERSION
|
||||
pip install -e .
|
||||
python setup.py develop
|
||||
elif [ "$TEST_TYPE" = lint ]; then
|
||||
|
@ -45,18 +46,18 @@ after_success:
|
|||
fi
|
||||
env:
|
||||
matrix:
|
||||
- TEST_TYPE=build
|
||||
- TEST_TYPE=build DJANGO_VERSION=1.10 DJANGO_FILTER_VERSION=1.0.0
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- python: '2.7'
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.6
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.6 DJANGO_FILTER_VERSION=0.15.3
|
||||
- python: '2.7'
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.7
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.7 DJANGO_FILTER_VERSION=0.15.3
|
||||
- python: '2.7'
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.8
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.8 DJANGO_FILTER_VERSION=0.15.3
|
||||
- python: '2.7'
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.9
|
||||
env: TEST_TYPE=build DJANGO_VERSION=1.9 DJANGO_FILTER_VERSION=1.0.0
|
||||
- python: '2.7'
|
||||
env: TEST_TYPE=lint
|
||||
deploy:
|
||||
|
|
|
@ -19,7 +19,7 @@ def get_filtering_args_from_filterset(filterset_class, type):
|
|||
args[name] = field_type
|
||||
|
||||
# Also add the 'order_by' field
|
||||
if filterset_class._meta.order_by:
|
||||
if getattr(filterset_class._meta, 'order_by', None):
|
||||
args[filterset_class.order_by_field] = String()
|
||||
|
||||
return args
|
||||
|
|
Loading…
Reference in New Issue
Block a user