mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Merge pull request #5207 from ryanpetrello/fix-4356
add the max_page_size value to the OPTIONS response for list views
This commit is contained in:
commit
81805c780f
@ -191,6 +191,10 @@ class Metadata(metadata.SimpleMetadata):
|
||||
if getattr(view, 'related_search_fields', None):
|
||||
metadata['related_search_fields'] = view.related_search_fields
|
||||
|
||||
from rest_framework import generics
|
||||
if isinstance(view, generics.ListAPIView) and hasattr(view, 'paginator'):
|
||||
metadata['max_page_size'] = view.paginator.max_page_size
|
||||
|
||||
return metadata
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user