[ckan-changes] [ckan/ckan] d14e32: Reduces the number of calls to get_package_type.

GitHub noreply at github.com
Tue Nov 25 15:46:58 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: d14e32d438da3947017e9fcc5362535d62e3b9a0
      https://github.com/ckan/ckan/commit/d14e32d438da3947017e9fcc5362535d62e3b9a0
  Author: Ross Jones <ross at servercode.co.uk>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M ckan/controllers/package.py

  Log Message:
  -----------
  Reduces the number of calls to get_package_type.

get_package_type in the package controller is called at the start of
several functions to retrieve the type field of the package - this is
done with a direct database call.  Most of these methods will go on to
call package_show before needing the value of package_type, and so this
PR removes lots of the calls and replaces them with pkg_dict accesses
closer to the where it is needed.

_get_package_type comment has also changed to more closely reflect what
it actually does (rather than what we wish it did).

This should close #2080


  Commit: 8a4d4cf90a1348b3515264de01f2874f289a1945
      https://github.com/ckan/ckan/commit/8a4d4cf90a1348b3515264de01f2874f289a1945
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2014-11-25 (Tue, 25 Nov 2014)

  Changed paths:
    M ckan/controllers/package.py

  Log Message:
  -----------
  Merge pull request #2084 from ckan/2080-reduce-use-of-get-package-type

Reduces the number of calls to get_package_type.


Compare: https://github.com/ckan/ckan/compare/775c41770038...8a4d4cf90a13


More information about the ckan-changes mailing list