Fixed queryset annotation bug

Preserve annotation of queryset for DjangoFilterConnectionField
This commit is contained in:
Jan Češpivo 2017-09-14 14:29:45 +02:00 committed by GitHub
parent f35e445963
commit 641223eb0e

View File

@ -61,7 +61,7 @@ class DjangoFilterConnectionField(DjangoConnectionField):
low = default_queryset.query.low_mark or queryset.query.low_mark
high = default_queryset.query.high_mark or queryset.query.high_mark
default_queryset.query.clear_limits()
queryset = default_queryset & queryset
queryset = queryset & default_queryset
queryset.query.set_limits(low, high)
return queryset