diff options
Diffstat (limited to 'rest_framework/pagination.py')
| -rw-r--r-- | rest_framework/pagination.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index b3658aca..496500ba 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -168,7 +168,9 @@ def _reverse_ordering(ordering_tuple): Given an order_by tuple such as `('-created', 'uuid')` reverse the ordering and return a new tuple, eg. `('created', '-uuid')`. """ - invert = lambda x: x[1:] if (x.startswith('-')) else '-' + x + def invert(x): + return x[1:] if (x.startswith('-')) else '-' + x + return tuple([invert(item) for item in ordering_tuple]) |
