Merge pull request #33 from keitaroinc/2.9-get-limit-fix

2.9-get-limit-fix
This commit is contained in:
Dushko Bogdanovski 2020-12-09 16:42:27 +01:00 committed by GitHub
commit d163ebdcce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
--- ckan/ckan/logic/action/get.py 2020-12-09 12:05:49.800909223 +0100
+++ get_limit_type_check.py 2020-12-09 12:11:58.404000000 +0100
@@ -371,8 +371,8 @@
'ckan.group_and_organization_list_all_fields_max', 25)
else:
max_limit = config.get('ckan.group_and_organization_list_max', 1000)
- if limit is None or limit > max_limit:
- limit = max_limit
+ if limit is None or int(limit) > max_limit:
+ limit = string(max_limit)
# order_by deprecated in ckan 1.8
# if it is supplied and sort isn't use order_by and raise a warning