diff --git a/ckan/controllers/related.py b/ckan/controllers/related.py index 85042aaa8eb..c85e694d432 100644 --- a/ckan/controllers/related.py +++ b/ckan/controllers/related.py @@ -1,5 +1,4 @@ - import ckan.model as model import ckan.logic as logic import ckan.lib.base as base @@ -18,8 +17,10 @@ def list(self, id): try: logic.check_access('package_show', context, data_dict) + except logic.NotFound: + base.abort(404, _('Dataset not found')) except logic.NotAuthorized: - abort(401, _('Not authorized to see this page')) + base.abort(401, _('Not authorized to see this page')) try: c.pkg_dict = logic.get_action('package_show')(context, data_dict)