diff --git a/ckan/logic/action/delete.py b/ckan/logic/action/delete.py index d3e15ec3139..cdc1703a5d4 100644 --- a/ckan/logic/action/delete.py +++ b/ckan/logic/action/delete.py @@ -105,12 +105,11 @@ def task_status_delete(context, data_dict): def vocabulary_delete(context, data_dict): model = context['model'] - user = context['user'] vocab_id = data_dict['id'] vocab_obj = model.vocabulary.Vocabulary.get(vocab_id) if vocab_obj is None: - raise NotFound + raise NotFound(_('Could not find vocabulary "%s"') % vocab_id) check_access('vocabulary_delete', context, data_dict) diff --git a/ckan/logic/action/update.py b/ckan/logic/action/update.py index 66616487409..cf16ae87645 100644 --- a/ckan/logic/action/update.py +++ b/ckan/logic/action/update.py @@ -615,7 +615,6 @@ def group_update_rest(context, data_dict): def vocabulary_update(context, data_dict): model = context['model'] - user = context['user'] vocab_id = data_dict['id'] model.Session.remove() @@ -623,7 +622,7 @@ def vocabulary_update(context, data_dict): vocab = model.vocabulary.Vocabulary.get(vocab_id) if vocab is None: - raise NotFound(_('Vocabulary was not found.')) + raise NotFound(_('Could not find vocabulary "%s"') % vocab_id) check_access('vocabulary_update', context, data_dict)