Commit 9c1151d3 authored by Willem ter Berg's avatar Willem ter Berg
parent d71769b2
......@@ -245,15 +245,15 @@ def show_schema(schema):
schema.update({
'identifier': [from_extras, mandatory],
'alternate_identifier': [from_extras, to_list_if_curly_string, recommended],
'alternate_identifier': [from_extras, recommended, to_list_if_curly_string],
'title': [mandatory],
'notes': [mandatory],
'modified': [from_extras, mandatory],
'changetype': [from_extras, mandatory],
'source_catalog': [from_extras, recommended],
'language': [from_extras, to_list_if_curly_string, mandatory],
'metadata_language': [from_extras, mandatory],
'theme': [from_extras, to_list_if_curly_string, mandatory],
'language': [from_extras, mandatory, to_list_if_curly_string],
'metadata_language': [from_extras, mandatory, to_list_if_curly_string],
'theme': [from_extras, mandatory, to_list_if_curly_string],
'contact_point_email': [from_extras, recommended],
'contact_point_address': [from_extras, recommended],
'contact_point_name': [from_extras, mandatory],
......@@ -266,25 +266,25 @@ def show_schema(schema):
'access_rights': [from_extras, recommended],
'url': [recommended],
'spatial_scheme': [from_extras, recommended],
'spatial_value': [from_extras, to_list_if_curly_string, recommended],
'spatial_value': [from_extras, recommended, to_list_if_curly_string],
'temporal_label': [from_extras, recommended],
'temporal_start': [from_extras, recommended],
'temporal_end': [from_extras, recommended],
'conforms_to': [from_extras, to_list_if_curly_string, recommended],
'related_resource': [from_extras, to_list_if_curly_string, recommended],
'source': [from_extras, to_list_if_curly_string, recommended],
'conforms_to': [from_extras, recommended, to_list_if_curly_string],
'related_resource': [from_extras, recommended, to_list_if_curly_string],
'source': [from_extras, recommended, to_list_if_curly_string],
'issued': [from_extras, recommended],
'version': [recommended],
'version_notes': [from_extras, to_list_if_curly_string, recommended],
'has_version': [from_extras, to_list_if_curly_string, recommended],
'is_version_of': [from_extras, to_list_if_curly_string, recommended],
'version_notes': [from_extras, recommended, to_list_if_curly_string],
'has_version': [from_extras, recommended, to_list_if_curly_string],
'is_version_of': [from_extras, recommended, to_list_if_curly_string],
'legal_foundation_ref': [from_extras, recommended],
'legal_foundation_uri': [from_extras, recommended],
'legal_foundation_label': [from_extras, recommended],
'documentation': [from_extras, to_list_if_curly_string, optional],
'documentation': [from_extras, optional, to_list_if_curly_string],
'frequency': [from_extras, optional],
'provenance': [from_extras, to_list_if_curly_string, optional],
'sample': [from_extras, to_list_if_curly_string, optional],
'provenance': [from_extras, optional, to_list_if_curly_string],
'sample': [from_extras, optional, to_list_if_curly_string],
'dataset_status': [from_extras, recommended],
'date_planned': [from_extras, optional],
})
......
......@@ -60,6 +60,7 @@ def convert_to_list_if_string(key, data_dict, errors, context):
:return: (key, data, errors, context), the original arguments, possibly modified
"""
values = data_dict[key]
values = values.replace('"', '')
if isinstance(values, basestring) and values.startswith('{') and values.endswith('}'):
data_dict[key] = values[1:len(values) - 1].split(',')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment