[ckan-changes] [okfn/ckan] 000372: Enable allow_partial_update for group update
GitHub
noreply at github.com
Mon Aug 20 16:35:59 UTC 2012
Branch: refs/heads/master
Home: https://github.com/okfn/ckan
Commit: 00037246c7cf1615aec377fbcf2f83530f56e2c6
https://github.com/okfn/ckan/commit/00037246c7cf1615aec377fbcf2f83530f56e2c6
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2012-08-20 (Mon, 20 Aug 2012)
Changed paths:
M ckan/controllers/group.py
M ckan/lib/dictization/model_save.py
Log Message:
-----------
Enable allow_partial_update for group update
Listen to allow_partial_update in the context when saving a group, and
use it in the group controller. This fixes issue #2854 where all an
organizations datasets were being removed on updating an organization
(with the organizations plugins enabled)
Commit: e432ac566eb5dac8ea2cf39b3235be72e204e827
https://github.com/okfn/ckan/commit/e432ac566eb5dac8ea2cf39b3235be72e204e827
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2012-08-20 (Mon, 20 Aug 2012)
Changed paths:
M ckan/lib/dictization/model_save.py
Log Message:
-----------
Apply allow_partial_update to all group fields
Make 'allow_partial_update': True in the context apply to multiple group
fields: packages, users, groups, tags and extras, when updating a group,
so you can pass a group dict with e.g. no 'packages' key and this will
update the group but will not change the group's packages. Previously
allow_partial_update only affected packages and extras.
Commit: 99a7aef666ff2fc387b5aa73a2fe4e8d73fabbe5
https://github.com/okfn/ckan/commit/99a7aef666ff2fc387b5aa73a2fe4e8d73fabbe5
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2012-08-20 (Mon, 20 Aug 2012)
Changed paths:
M ckan/lib/dictization/model_save.py
Log Message:
-----------
Allow passing empty lists to group_update
If, for example, a group dict with a 'packages' key with an empty list
as the value is passed to group_update, then set the group's packages to
an empty list (i.e. remove any packages from the group), even if
'allow_partial_update': True was specified in the context (previously
such an empty list would be ignored and the group's packages would not
change). Also applies to other group fields e.g. tags, users, groups, etc.
Compare: https://github.com/okfn/ckan/compare/c7cdab4b2b8d...99a7aef666ff
More information about the ckan-changes
mailing list