Skip to content

Commit

Permalink
Restored get_queryset
Browse files Browse the repository at this point in the history
  • Loading branch information
KalobTaulien authored and gasman committed Jun 2, 2020
1 parent 4151ef5 commit 2072902
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions wagtail_transfer/vendor/wagtail_admin_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ def get_base_queryset(self):
"""
return Page.objects.all()

def get_queryset(self):
queryset = super().get_queryset()

# Hide root page
# TODO: Add "include_root" flag
# .specific() is required to use .get_admin_display_title()
queryset = queryset.exclude(depth=1).specific()
return queryset

def get_type_info(self):
types = OrderedDict()

Expand Down

0 comments on commit 2072902

Please sign in to comment.