Skip to content

Commit

Permalink
Merge branch '2852-ensure-grouptype-used'
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Feb 17, 2016
2 parents e3825c8 + 56b622a commit 6264bd4
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions ckan/controllers/group.py
Expand Up @@ -207,7 +207,7 @@ def read(self, id, limit=20):
'user': c.user,
'schema': self._db_to_form_schema(group_type=group_type),
'for_view': True}
data_dict = {'id': id}
data_dict = {'id': id, 'type': group_type}

# unicode format (decoded from utf8)
c.q = request.params.get('q', '')
Expand Down Expand Up @@ -392,7 +392,7 @@ def bulk_process(self, id):
'user': c.user,
'schema': self._db_to_form_schema(group_type=group_type),
'for_view': True, 'extras_as_string': True}
data_dict = {'id': id}
data_dict = {'id': id, 'type': group_type}

try:
# Do not query for the group datasets when dictizing, as they will
Expand Down Expand Up @@ -532,16 +532,6 @@ def edit(self, id, data=None, errors=None, error_summary=None):
return render(self._edit_template(c.group.type),
extra_vars={'group_type': group_type})

def _get_group_type(self, id):
"""
Given the id of a group it determines the type of a group given
a valid id/name for the group.
"""
group = model.Group.get(id)
if not group:
return None
return group.type

def _save_new(self, context, group_type=None):
try:
data_dict = clean_dict(dict_fns.unflatten(
Expand Down

0 comments on commit 6264bd4

Please sign in to comment.