From c9946d3db06c7eec0a4127ecc7fa5edc3cf4ae78 Mon Sep 17 00:00:00 2001 From: John Glover Date: Mon, 26 Mar 2012 14:36:04 +0100 Subject: [PATCH] [xs][controller/package] bug fix: use _get_package_type in history function instead of trying to access the 'type' key on the package dict (may not exist). --- ckan/controllers/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckan/controllers/package.py b/ckan/controllers/package.py index ac6ac2b40d7..90b9a3bff01 100644 --- a/ckan/controllers/package.py +++ b/ckan/controllers/package.py @@ -375,7 +375,8 @@ def history(self, id): ) feed.content_type = 'application/atom+xml' return feed.writeString('utf-8') - return render( self._history_template(c.pkg_dict['type'])) + package_type = self._get_package_type(id) + return render(self._history_template(package_type)) def new(self, data=None, errors=None, error_summary=None):