mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-31 11:48:38 +03:00
Fixed so that GrapheneFilterSetMixin is used with any provided filterset_class
This commit is contained in:
parent
4d905a46ac
commit
132c4cb9d4
|
@ -35,17 +35,16 @@ class DjangoFilterConnectionField(DjangoConnectionField):
|
||||||
@property
|
@property
|
||||||
def filterset_class(self):
|
def filterset_class(self):
|
||||||
if not self._filterset_class:
|
if not self._filterset_class:
|
||||||
if not self.node_type._meta.filterset_class:
|
fields = self._fields or self.node_type._meta.filter_fields
|
||||||
fields = self._fields or self.node_type._meta.filter_fields
|
meta = dict(model=self.model, fields=fields)
|
||||||
meta = dict(model=self.model, fields=fields)
|
if self._extra_filter_meta:
|
||||||
if self._extra_filter_meta:
|
meta.update(self._extra_filter_meta)
|
||||||
meta.update(self._extra_filter_meta)
|
|
||||||
|
|
||||||
self._filterset_class = get_filterset_class(
|
filterset_class = self._provided_filterset_class or (
|
||||||
self._provided_filterset_class, **meta
|
self.node_type._meta.filterset_class)
|
||||||
)
|
self._filterset_class = get_filterset_class(
|
||||||
else:
|
filterset_class, **meta
|
||||||
self._filterset_class = self.node_type._meta.filterset_class
|
)
|
||||||
|
|
||||||
return self._filterset_class
|
return self._filterset_class
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user