Skip to content

Commit

Permalink
Github issues # 26 - Bug fix - checking if extra field is 'active'
Browse files Browse the repository at this point in the history
  • Loading branch information
ykhadilkar committed Jan 14, 2015
1 parent 1fb42a3 commit b6154f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckanext/datajson/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ def get_packages(owner_org):
packages = get_all_group_packages(group_id=owner_org)
#get packages for sub-agencies.
sub_agency = model.Group.get(owner_org)
if 'sub-agencies' in sub_agency.extras.col.target:
if 'sub-agencies' in sub_agency.extras.col.target and \
sub_agency.extras.col.target['sub-agencies'].state == 'active':
sub_agencies = sub_agency.extras.col.target['sub-agencies'].value
sub_agencies_list = sub_agencies.split(",")
for sub in sub_agencies_list:
Expand Down

0 comments on commit b6154f2

Please sign in to comment.