Skip to content

Commit

Permalink
feat: Use lowercase for the key in the mapping format and media formats
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalch committed Nov 27, 2023
1 parent 8ddc709 commit d34eedc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/geocat/utils/mapping_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_format_values():
g.parse(file, format='xml')
format_values = {}
for format_uri_ref in g.subjects():
format_extension = format_uri_ref.split('/')[-1]
format_extension = format_uri_ref.split('/')[-1].lower()
format_values[format_extension] = format_uri_ref
return format_values

Expand All @@ -101,7 +101,7 @@ def get_iana_media_type_values():
continue
if record.find('ns:name', media_types_namespaces) is None:
continue
name = record.find('ns:name', media_types_namespaces).text
name = record.find('ns:name', media_types_namespaces).text.lower()
file_value = record.find('ns:file', media_types_namespaces).text
media_type_values[name] = media_types_namespaces['ns']+'/'+file_value
return media_type_values

0 comments on commit d34eedc

Please sign in to comment.