From 744ae451f6d0d2a3c43cdf0cc7e9961b6e80002e Mon Sep 17 00:00:00 2001 From: Brook Elgie Date: Wed, 16 Mar 2016 11:45:20 +0000 Subject: [PATCH] Remove duplicate function definition --- ckan/logic/validators.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ckan/logic/validators.py b/ckan/logic/validators.py index 9adaf483145..f1321d7e007 100644 --- a/ckan/logic/validators.py +++ b/ckan/logic/validators.py @@ -264,15 +264,6 @@ def activity_type_exists(activity_type): else: raise Invalid('%s: %s' % (_('Not found'), _('Activity type'))) -def resource_id_exists(value, context): - - model = context['model'] - session = context['session'] - - result = session.query(model.Resource).get(value) - if not result: - raise Invalid('%s: %s' % (_('Not found'), _('Resource'))) - return value # A dictionary mapping activity_type values from activity dicts to functions # for validating the object_id values from those same activity dicts.