Skip to content
Snippets Groups Projects
Commit 5cf69293 authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Hardened openness score mapping

parent 06d82c2a
Branches
Tags
2 merge requests!41Version 2.0.0,!38Merge py3 into dev
......@@ -359,8 +359,7 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm
d = json.loads(dict_pkg['validated_data_dict'])
score = -1
for r in d['resources']:
if 'qa' in r:
if 'openness_score' in r['qa']:
if ('qa' in r) and (type(r['qa']) is dict) and ('openness_score' in r['qa']):
s = int(r['qa']['openness_score'])
if s > score:
score = s
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment