Skip to content

Commit

Permalink
[#1711] reduce context unpleasantness
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed May 15, 2014
1 parent f9bcc77 commit 303ab34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ckan/lib/dictization/model_save.py
Expand Up @@ -381,14 +381,13 @@ def group_member_save(context, group_dict, member_table_name):
return processed


def group_dict_save(group_dict, context):
def group_dict_save(group_dict, context, prevent_packages_update=False):
from ckan.lib.search import rebuild

model = context["model"]
session = context["session"]
group = context.get("group")
allow_partial_update = context.get("allow_partial_update", False)
prevent_packages_update = context.get("prevent_packages_update", False)

Group = model.Group
if group:
Expand Down
4 changes: 2 additions & 2 deletions ckan/logic/action/update.py
Expand Up @@ -523,8 +523,8 @@ def _group_or_org_update(context, data_dict, is_org=False):
else:
rev.message = _(u'REST API: Update object %s') % data.get("name")

context['prevent_packages_update'] = is_org
group = model_save.group_dict_save(data, context)
group = model_save.group_dict_save(data, context,
prevent_packages_update=is_org)

if is_org:
plugin_type = plugins.IOrganizationController
Expand Down

0 comments on commit 303ab34

Please sign in to comment.