mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
add the max_page_size value to the OPTIONS response for list views
see: #4356
This commit is contained in:
parent
68d9457de9
commit
8615c1e999
@ -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