From 1db1cbdd9ca9d3dc62158e8a5ecd03b7fc8d1e51 Mon Sep 17 00:00:00 2001 From: Samuel Cormier-Iijima Date: Mon, 13 Nov 2017 12:47:55 -0500 Subject: [PATCH] Fix passing request context to filterset creation Currently this code throws an error about `context` not being defined. --- graphene_django/filter/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/filter/fields.py b/graphene_django/filter/fields.py index ae6f6a6..cf53ea3 100644 --- a/graphene_django/filter/fields.py +++ b/graphene_django/filter/fields.py @@ -73,7 +73,7 @@ class DjangoFilterConnectionField(DjangoConnectionField): qs = filterset_class( data=filter_kwargs, queryset=default_manager.get_queryset(), - request=context + request=info.context ).qs return super(DjangoFilterConnectionField, cls).connection_resolver(