[ckan-changes] commit/ckanextiati: amercader: Fix bug when editing groups with packages. Probably related to group_formalchemy?

Bitbucket commits-noreply at bitbucket.org
Mon Jun 27 11:23:19 UTC 2011


1 new changeset in ckanextiati:

http://bitbucket.org/okfn/ckanextiati/changeset/10246294e0d1/
changeset:   10246294e0d1
user:        amercader
date:        2011-06-27 13:23:09
summary:     Fix bug when editing groups with packages. Probably related to group_formalchemy?
affected #:  1 file (17 bytes)

--- a/ckanext/iati/authz.py	Fri Jun 24 12:55:12 2011 +0100
+++ b/ckanext/iati/authz.py	Mon Jun 27 12:23:09 2011 +0100
@@ -30,7 +30,7 @@
     
     @classmethod
     def _sync_authz_groups(cls, pkg):
-        authz_groups = [_get_group_authz_group(g) for g in pkg.groups]
+        authz_groups = [_get_group_authz_group(g) for g in pkg.groups if g is not None]
         q = model.Session.query(model.PackageRole).filter_by(package=pkg)
         for package_role in q.all():
             if package_role.authorized_group is None:

Repository URL: https://bitbucket.org/okfn/ckanextiati/

--

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