Skip to content

Commit

Permalink
Changed config name and wrapped long line
Browse files Browse the repository at this point in the history
  • Loading branch information
howff committed Nov 29, 2018
1 parent 3a4a778 commit 386e137
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/controllers/package.py
Expand Up @@ -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
Expand Down

0 comments on commit 386e137

Please sign in to comment.