[ckan-changes] [ckan/ckan] 39132e: Ensure page parameters are valid.

GitHub noreply at github.com
Thu Nov 20 19:56:47 UTC 2014


  Branch: refs/heads/2042-invalid-page-numbers
  Home:   https://github.com/ckan/ckan
  Commit: 39132e3a34c6c9e770ff2ff8525e42919dd67142
      https://github.com/ckan/ckan/commit/39132e3a34c6c9e770ff2ff8525e42919dd67142
  Author: Ross Jones <ross at servercode.co.uk>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M ckan/controllers/feed.py
    M ckan/controllers/group.py
    M ckan/controllers/package.py
    M ckan/controllers/related.py
    M ckan/controllers/revision.py
    M ckan/controllers/tag.py
    M ckan/controllers/user.py
    M ckan/lib/alphabet_paginate.py
    M ckan/lib/base.py
    M ckan/tests/functional/test_group.py

  Log Message:
  -----------
  Ensure page parameters are valid.

Fixes #2042 by ensuring that:

- Invalid numbers aren't passed through to logic layer or paginator
- There is a default should an invalid number is passed. Numbers less
  than 1 will raise a 400.

Adds a _get_page_number() to the BaseController for re-use in all the
subclasses.




More information about the ckan-changes mailing list