From 386e13759fd72528caba570e02536f1b7e70c79c Mon Sep 17 00:00:00 2001 From: howff Date: Thu, 29 Nov 2018 11:30:32 +0000 Subject: [PATCH] Changed config name and wrapped long line --- 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 918c140061c..24772c076e0 100644 --- a/ckan/controllers/package.py +++ b/ckan/controllers/package.py @@ -667,7 +667,8 @@ def new_resource(self, id, data=None, errors=None, error_summary=None): except NotFound: abort(404, _('The dataset {id} could not be found.' ).format(id=id)) - if asbool(config.get('ckan.dataset.create.require.resource', 'True')) and not len(data_dict['resources']): + if asbool(config.get('ckan.dataset.create_on_ui_requires_resources', 'True')) \ + and not len(data_dict['resources']): # no data and configured to require resource so keep on page msg = _('You must add at least one data resource') # On new templates do not use flash message