Skip to content

Commit

Permalink
[#1451] pep8 and a few things to make things a look nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed Jan 24, 2014
1 parent a0b7780 commit 155fd9b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ckanext/datapusher/logic/action.py
Expand Up @@ -45,9 +45,12 @@ def datapusher_submit(context, data_dict):

datapusher_url = pylons.config.get('ckan.datapusher.url')

callback_url = pylons.config['ckan.site_url'].rstrip('/') + p.toolkit.url_for(
controller='api', action='action', logic_function='datapusher_hook',
ver=3)
site_url = pylons.config['ckan.site_url']

This comment has been minimized.

Copy link
@amercader

amercader Jan 24, 2014

Member

@kindly maybe we still need the rstrip?


callback_url = site_url + p.toolkit.url_for(
controller='api', action='action',
logic_function='datapusher_hook', ver=3
)

user = p.toolkit.get_action('user_show')(context, {'id': context['user']})

Expand Down Expand Up @@ -86,7 +89,7 @@ def datapusher_submit(context, data_dict):
'job_type': 'push_to_datastore',
'result_url': callback_url,
'metadata': {
'ckan_url': pylons.config['ckan.site_url'],
'ckan_url': site_url,
'resource_id': res_id,
'set_url_type': data_dict.get('set_url_type', False)
}
Expand Down

0 comments on commit 155fd9b

Please sign in to comment.