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

Fixed missing dependency and warning for subjects not found in subject mapping dictionary

parent ad68d5cd
No related branches found
No related tags found
1 merge request!48Merge dev into master
......@@ -4,6 +4,8 @@ import csv
import re
import urllib.request, urllib.error, urllib.parse
import json
import ckan.logic as logic
from itertools import count
from dateutil.parser import parse
......@@ -329,11 +331,11 @@ def _convert_subjectID_to_subjectText(subject_id, flattened_data):
try:
subject_text = subject_mapping[subject_id]
except:
raise toolkit.Invalid(_('Subject must be a known URI.'))
log.warning(
'Subject_id "{}" not found in subject mapping dictionary.\nSubject mapping file: {}'
.format(subject_id, subject_mapping_file_path)
)
raise toolkit.Invalid(_('Subject must be a known URI.'))
new_index = next_extra_index(flattened_data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment