mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Python3.5 compat
This commit is contained in:
parent
91f9677f57
commit
99bd5b0e1f
|
@ -875,7 +875,7 @@ class CursorPagination(BasePagination):
|
|||
pk_name = queryset.model._meta.pk.name
|
||||
|
||||
# Always include a unique key to order by
|
||||
if not {f"-{pk_name}", pk_name, "pk", "-pk"} & set(ordering):
|
||||
if not {"-{}".format(pk_name), pk_name, "pk", "-pk"} & set(ordering):
|
||||
ordering = tuple(ordering) + (pk_name,)
|
||||
|
||||
return tuple(ordering)
|
||||
|
|
Loading…
Reference in New Issue
Block a user