diff options
| author | Tom Christie | 2015-02-09 20:43:50 +0000 |
|---|---|---|
| committer | Tom Christie | 2015-02-09 20:43:50 +0000 |
| commit | fbb21caaaa01033bbd34b0c63ab48243ffb6310e (patch) | |
| tree | 5d0fdee18c9bf02733b1df913c4cddd9e3e86da7 /rest_framework/pagination.py | |
| parent | 407480b4840990ff17f9a33b293cfcf15bb6f7c5 (diff) | |
| parent | 7b639c0cd0676172cc8502e833f5b708f39f9a83 (diff) | |
| download | django-rest-framework-fbb21caaaa01033bbd34b0c63ab48243ffb6310e.tar.bz2 | |
Merge master
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]) |
