Skip to content

Instantly share code, notes, and snippets.

@rossjones
Created September 10, 2015 08:19
Show Gist options
  • Save rossjones/ee9ad6e72aee88aaaa44 to your computer and use it in GitHub Desktop.
Save rossjones/ee9ad6e72aee88aaaa44 to your computer and use it in GitHub Desktop.
  1. Change your schema and templates and so forth to have package_create and package_update store your domain field.
  2. In your IDomainObjectNotification, you'll get an object called entity which is a package model from ckan/model/package.py
  3. You can find the groups for this package using get_groups()
  4. You can add the package to a group by calling add_package_by_name on the group object.
  5. If you find the domain property isn't available in package.extras.get('domain') then you may need to use notify_after_commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment