Skip to content

Commit

Permalink
Shorter lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Brooks committed Dec 14, 2018
1 parent ed0e35a commit 24a991e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckan/controllers/package.py
Expand Up @@ -667,9 +667,10 @@ 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_on_ui_requires_resources', 'True')) \
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
# no data and configured to require resource: stay 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 24a991e

Please sign in to comment.