mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-03-16 22:10:28 +00:00
add clarifying comment about passing a single page type
This commit is contained in:
parent
1d8f85c1c5
commit
dd664218b1
1 changed files with 2 additions and 0 deletions
|
|
@ -437,6 +437,8 @@ class PagesAPIViewSet(BaseAPIViewSet):
|
|||
return self.get_base_queryset()
|
||||
|
||||
elif len(models) == 1:
|
||||
# If a single page type has been specified, swap out the Page-based queryset for one based on
|
||||
# the specific page model so that we can filter on any custom APIFields defined on that model
|
||||
return models[0].objects.filter(id__in=self.get_base_queryset().values_list('id', flat=True))
|
||||
|
||||
else: # len(models) > 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue