Skip to content

Commit

Permalink
[#1208] More robust boolean param handling
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 11, 2013
1 parent c68bd37 commit 2028066
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ckan/logic/action/get.py
Expand Up @@ -960,8 +960,10 @@ def _group_or_org_show(context, data_dict, is_org=False):
group = model.Group.get(id)
context['group'] = group

context['include_datasets'] = (
data_dict.get('include_datasets','true').lower() in ('true', '1'))
include_datasets = data_dict.get('include_datasets', True)
if isinstance(include_datasets, basestring):
include_datasets = (include_datasets.lower() in ('true', '1'))
context['include_datasets'] = include_datasets

if group is None:
raise NotFound
Expand Down

0 comments on commit 2028066

Please sign in to comment.