Skip to content

Conversation

gluk-w
Copy link

@gluk-w gluk-w commented May 7, 2018

# Let's say queryset consists of unions
qs = qs.union(...)
qs = qs.union(...)

# Let's say queryset returns 20 objects total
assert qs.count() == 20

# Works fine if offset is higher than zero because "OFFSET 1 ROWS FETCH FIRST 10 ROWS ONLY" is applied
assert len(list(qs[1:10])) == 10

# This fails without my fix because "OFFSET 0 ROWS FETCH FIRST 10 ROWS ONLY" is not applied
assert len(list(qs[0:10])) == 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant