Skip to content

Commit 52af553

Browse files
committed
fix: Don't use negative integers to slice
1 parent da390d0 commit 52af553

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene_mongo/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def get_query(cls, model, info, **args):
142142
objs = objs[:first]
143143
if last is not None:
144144
# https://github.com/graphql-python/graphene-mongo/issues/20
145-
objs = objs[-(last+1):]
145+
objs = objs[list_length - last:]
146146
else:
147147
list_length = objs.count()
148148

0 commit comments

Comments
 (0)