Skip to content

Commit

Permalink
[#938] Don't push private resources automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Aug 12, 2013
1 parent bc18309 commit fe0c175
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ckanext/datastore/plugin.py
Expand Up @@ -115,9 +115,13 @@ def notify(self, entity, operation=None):
# if operation is None, resource URL has been changed, as
# the notify function in IResourceUrlChange only takes
# 1 parameter
p.toolkit.get_action('datapusher_submit')(context, {
'resource_id': entity.id
package = p.toolkit.get_action('package_show')(context, {
'id': entity.get_package_id()
})
if not package['private']:
p.toolkit.get_action('datapusher_submit')(context, {
'resource_id': entity.id
})
if not isinstance(entity, model.Package) or self.legacy_mode:
return
# if a resource is new, it cannot have a datastore resource, yet
Expand Down

0 comments on commit fe0c175

Please sign in to comment.