mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-26 05:31:07 +03:00 
			
		
		
		
	Revert "Now throws a 404 if page isn't an int"
This reverts commit ae059c78da.
			
			
This commit is contained in:
		
							parent
							
								
									8136a94ebe
								
							
						
					
					
						commit
						20a95db60a
					
				|  | @ -713,7 +713,7 @@ class PaginatorMixin(object): | ||||||
|         try: |         try: | ||||||
|             page_num = int(self.request.GET.get('page', '1')) |             page_num = int(self.request.GET.get('page', '1')) | ||||||
|         except ValueError: |         except ValueError: | ||||||
|             raise ErrorResponse(status.HTTP_404_NOT_FOUND, {'detail': 'That page contains no results'}) |             page_num = 1 | ||||||
| 
 | 
 | ||||||
|         if page_num not in paginator.page_range: |         if page_num not in paginator.page_range: | ||||||
|             raise ErrorResponse(status.HTTP_404_NOT_FOUND, {'detail': 'That page contains no results'}) |             raise ErrorResponse(status.HTTP_404_NOT_FOUND, {'detail': 'That page contains no results'}) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user