Skip to content

Commit 9815a7f

Browse files
author
Yatin Khadilkar
committed
Merge pull request #3 from ykhadilkar-rei/master
Merging REI Repo - Part of release 1.16
2 parents ced5159 + c41220a commit 9815a7f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ckanext/datajson/build_datajson.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ def make_datajson_entry(package):
9898
log.warn("Missing required field detected for package with id=[%s], title=['%s']: '%s'", package.get('id', None), package.get('title', None), required_field)
9999
return
100100

101-
return OrderedDict(striped_retlist)
101+
# When saved from UI DataQuality value is stored as "on" instead of True.
102+
# Check if value is "on" and replace it with True.
103+
striped_retlist_dict = OrderedDict(striped_retlist)
104+
if striped_retlist_dict.get('dataQuality') == "on":
105+
striped_retlist_dict['dataQuality'] = True
106+
107+
return striped_retlist_dict
102108

103109

104110
def extra(package, key, default=None):
File renamed without changes.

0 commit comments

Comments
 (0)