Skip to content

Commit

Permalink
feat: allow overriding the entity listview queryset
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Nov 14, 2023
1 parent 1f9a1a0 commit 0548faa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apis_core/apis_entities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ def test_func(self):
def get_queryset(self, **kwargs):
self.entity = self.kwargs.get("entity")

qs = (self.get_model().objects.all()).order_by("name")
qs = get_member_for_entity(
self.get_model(), path="querysets", suffix="ListViewQueryset"
)
if qs is None:
qs = (self.get_model().objects.all()).order_by("name")
self.filter = get_list_filter_of_entity(self.entity)(
self.request.GET, queryset=qs
)
Expand Down

0 comments on commit 0548faa

Please sign in to comment.