Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework ordering filter #1118

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Correct a comment
earshinov committed May 24, 2020
commit 56f81cd6f2a53524fb2c2e387779e576bd1b08e0
2 changes: 1 addition & 1 deletion django_filters/filters.py
Original file line number Diff line number Diff line change
@@ -844,7 +844,7 @@ def normalize_ordering_descriptor(cls, descriptor):
return descriptor

if isinstance(descriptor, collections.Sequence):
# A sequence of model field names
# A sequence of model field names or Django expressions
return {
"exprs": [F(field) if isinstance(field, str) else field for field in descriptor]
}