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
|
||||
def filterset_class(self):
|
||||
if not self._filterset_class:
|
||||
if not self.node_type._meta.filterset_class:
|
||||
fields = self._fields or self.node_type._meta.filter_fields
|
||||
meta = dict(model=self.model, fields=fields)
|
||||
if self._extra_filter_meta:
|
||||
meta.update(self._extra_filter_meta)
|
||||
fields = self._fields or self.node_type._meta.filter_fields
|
||||
meta = dict(model=self.model, fields=fields)
|
||||
if self._extra_filter_meta:
|
||||
meta.update(self._extra_filter_meta)
|
||||
|
||||
self._filterset_class = get_filterset_class(
|
||||
self._provided_filterset_class, **meta
|
||||
)
|
||||
else:
|
||||
self._filterset_class = self.node_type._meta.filterset_class
|
||||
filterset_class = self._provided_filterset_class or (
|
||||
self.node_type._meta.filterset_class)
|
||||
self._filterset_class = get_filterset_class(
|
||||
filterset_class, **meta
|
||||
)
|
||||
|
||||
return self._filterset_class
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user