Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Fix page_size setting for related media (#394)
Browse files Browse the repository at this point in the history
Co-authored-by: Zack Krida <[email protected]>
Co-authored-by: Madison Swain-Bowden <[email protected]>
  • Loading branch information
3 people authored Dec 11, 2021
1 parent 13673ee commit c67f7bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openverse_api/catalog/api/views/media_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def related(self, request, identifier=None, *_, **__):
)
self.paginator.result_count = num_results
self.paginator.page_count = 1
self.paginator.page_size = num_results
# `page_size` refers to the maximum number of related images to return.
self.paginator.page_size = 10
except ValueError as e:
raise get_api_exception(getattr(e, "message", str(e)))

Expand Down

0 comments on commit c67f7bd

Please sign in to comment.