Skip to content

Commit

Permalink
Update radar export to schema version 9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Dec 3, 2023
1 parent 00d3e94 commit 9e489a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions rdmo_plugins/exports/radar/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ def get_dataset(self, set_index):
for subject_area in subject_areas:
if subject_area.is_true:
if subject_area.option:
controlled_subject_area_name = self.controlled_subject_area_options.get(subject_area.option.path, 'Other')
controlled_subject_area_name = self.controlled_subject_area_options.get(subject_area.option.uri_path, 'OTHER')
else:
controlled_subject_area_name = 'Other'
controlled_subject_area_name = 'OTHER'

if controlled_subject_area_name == 'Other':
if controlled_subject_area_name == 'OTHER':
dataset['subjectAreas']['subjectArea'].append({
'controlledSubjectAreaName': controlled_subject_area_name,
'additionalSubjectAreaName': subject_area.value
Expand Down Expand Up @@ -301,13 +301,13 @@ def get_dataset(self, set_index):
dataset['rights'] = []
for rights in rights_list:
if rights.option:
controlled_rights = self.controlled_rights_options.get(rights.option.path, 'Other')
controlled_rights = self.controlled_rights_options.get(rights.option.uri_path, 'OTHER')
else:
controlled_rights = 'Other'
controlled_rights = 'OTHER'

dataset['rights'] = {
'controlledRights': controlled_rights,
'additionalRights': rights.value if controlled_rights == 'Other' else None
'additionalRights': rights.value if controlled_rights == 'OTHER' else None
}

# rights holders
Expand All @@ -331,7 +331,7 @@ def get_dataset(self, set_index):
keywords = self.get_list('project/research_question/keywords')
if keywords:
dataset['keywords'] = {
'keyword': keywords
'keyword': [{'value': keyword} for keyword in keywords]
}

# contributors
Expand Down
2 changes: 1 addition & 1 deletion rdmo_plugins/exports/radar/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def get_post_data(self, set_index):
"responsibleEmail": email,
"schema": {
"key": "RDDM",
"version": "09"
"version": "9.1"
}
},
'descriptiveMetadata': dataset
Expand Down

0 comments on commit 9e489a2

Please sign in to comment.