Permalink
Browse files

[#1490] Fox datapusher_hook callback URL

The old implementation didn't work for deployments that were not located
on a non-root location (eg http://someorg.com/ckan). This fixes it and
also allows the action to be run outside of a web request eg from the command
line
  • Loading branch information...
1 parent f49cb0a commit e0a31ed78cf7d73a533af584e92beb4d5314c452 @amercader amercader committed Feb 3, 2014
Showing with 1 addition and 5 deletions.
  1. +1 −5 ckanext/datapusher/logic/action.py
@@ -46,11 +46,7 @@ def datapusher_submit(context, data_dict):
datapusher_url = pylons.config.get('ckan.datapusher.url')
site_url = pylons.config['ckan.site_url']
-
- callback_url = site_url.rstrip('/') + p.toolkit.url_for(
- controller='api', action='action',
- logic_function='datapusher_hook', ver=3
- )
+ callback_url = site_url.rstrip('/') + '/api/3/action/datapusher_hook'
user = p.toolkit.get_action('user_show')(context, {'id': context['user']})

0 comments on commit e0a31ed

Please sign in to comment.