From 0a91f9cbdadba214a62e38fab32d3c5f89155fc3 Mon Sep 17 00:00:00 2001 From: GarakdongBigBoy Date: Mon, 23 Oct 2017 17:26:36 +0900 Subject: [PATCH] Update checks.py #5170 --- rest_framework/checks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest_framework/checks.py b/rest_framework/checks.py index af6634d1e3..8cb40e4d7c 100644 --- a/rest_framework/checks.py +++ b/rest_framework/checks.py @@ -6,13 +6,14 @@ def pagination_system_check(app_configs, **kwargs): errors = [] # Use of default page size setting requires a default Paginator class from rest_framework.settings import api_settings - if api_settings.PAGE_SIZE and not api_settings.DEFAULT_PAGINATION_CLASS: + if api_settings.PAGE_SIZE and ("DEFAULT_PAGINATION_CLASS" not in api_settings.user_settings): errors.append( Warning( "You have specified a default PAGE_SIZE pagination rest_framework setting," "without specifying also a DEFAULT_PAGINATION_CLASS.", hint="The default for DEFAULT_PAGINATION_CLASS is None. " "In previous versions this was PageNumberPagination", + "PAGE_SIZE needs specifying a DEFAULT_PAGINATION_CLASS Even though the value is None," ) ) return errors