Skip to content

Commit

Permalink
Issue # 106 - On data.json export checking if DataQuality value is On.
Browse files Browse the repository at this point in the history
  • Loading branch information
ykhadilkar committed Mar 21, 2014
1 parent 6b7cec9 commit c41220a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ckanext/datajson/build_datajson.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ def make_datajson_entry(package):
log.warn("Missing required field detected for package with id=[%s], title=['%s']: '%s'", package.get('id', None), package.get('title', None), required_field)
return

return OrderedDict(striped_retlist)
# When saved from UI DataQuality value is stored as "on" instead of True.
# Check if value is "on" and replace it with True.
striped_retlist_dict = OrderedDict(striped_retlist)
if striped_retlist_dict.get('dataQuality') == "on":
striped_retlist_dict['dataQuality'] = True

return striped_retlist_dict


def extra(package, key, default=None):
Expand Down

0 comments on commit c41220a

Please sign in to comment.