[ckan-changes] commit/ckan: amercader: [logic] Fix for #1375 (Define new package id before sending it to the IPackageController plugins)
Bitbucket
commits-noreply at bitbucket.org
Mon Oct 10 15:07:29 UTC 2011
1 new changeset in ckan:
http://bitbucket.org/okfn/ckan/changeset/888ed50c098d/
changeset: 888ed50c098d
user: amercader
date: 2011-10-10 17:07:11
summary: [logic] Fix for #1375 (Define new package id before sending it to the IPackageController plugins)
affected #: 1 file (-1 bytes)
--- a/ckan/logic/action/create.py Mon Oct 10 12:14:06 2011 +0100
+++ b/ckan/logic/action/create.py Mon Oct 10 17:07:11 2011 +0200
@@ -61,6 +61,8 @@
admins = [model.User.by_name(user.decode('utf8'))]
model.setup_default_user_roles(pkg, admins)
+ # Needed to let extensions know the package id
+ model.Session.flush()
for item in PluginImplementations(IPackageController):
item.create(pkg)
model.repo.commit()
@@ -162,6 +164,8 @@
else:
admins = []
model.setup_default_user_roles(group, admins)
+ # Needed to let extensions know the group id
+ model.Session.flush()
for item in PluginImplementations(IGroupController):
item.create(group)
model.repo.commit()
Repository URL: https://bitbucket.org/okfn/ckan/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list