Issue #1207 : Backward Pagination not working correctly when using with last and before arguments

This commit is contained in:
Thiyagu2009 2021-06-03 17:44:53 +05:30 committed by GitHub
parent 623d0f219e
commit 572c305704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,8 @@ class DjangoConnectionField(ConnectionField):
if max_limit is not None and args.get("first", None) is None:
if args.get("last", None) is not None:
after = list_length - args["last"]
if args.get("before", None) is None:
after = list_length - args["last"]
else:
args["first"] = max_limit