Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Django expects the short form
  • Loading branch information
kthoden committed Jul 18, 2019
1 parent b45b6cb commit f0f2805
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tei2imxml.py
Expand Up @@ -106,7 +106,7 @@ def get_field(xml_tree, query_path, mandatory=False, findall=False, noformat=Fal
# Mandatory values (according to database schema)
info_dict['eoa_publicationdate'] = get_field(xml_tree, "//t:teiHeader/t:fileDesc/t:publicationStmt/t:date/@when", mandatory=True)
info_dict['eoa_language'] = get_field(xml_tree, "//t:teiHeader/t:profileDesc/t:langUsage/t:language/@ident", mandatory=True)
info_dict['eoa_license'] = get_field(xml_tree, "//t:teiHeader/t:fileDesc/t:publicationStmt/t:availability/t:licence/text()", mandatory=True)
info_dict['eoa_license'] = get_field(xml_tree, "//t:teiHeader/t:fileDesc/t:publicationStmt/t:availability/t:licence/@target", mandatory=True)
info_dict['eoa_number'] = get_field(xml_tree, "//t:teiHeader/t:fileDesc/t:seriesStmt/t:idno[@type='number']/text()", mandatory=True)
info_dict['eoa_series'] = get_field(xml_tree, "//t:teiHeader/t:fileDesc/t:seriesStmt/t:title/text()", mandatory=True)
info_dict['eoa_title'] = get_field(xml_tree, "//t:teiHeader/t:fileDesc/t:titleStmt/t:title[@type='main']/text()", mandatory=True)
Expand Down Expand Up @@ -165,7 +165,7 @@ def make_publication_cfg(info_dict, translation_file):
technical_config['Price'] = "{} {}".format(info_dict['eoa_price'], info_dict['eoa_currency'])
technical_config['Shoplink'] = """<a href="{0}">{1}</a>""".format(info_dict['eoa_shoplink_url'], info_dict['eoa_shoplink_text']) #ok
technical_config['Language'] = info_dict['eoa_language'] #ok
technical_config['License'] = info_dict['eoa_license'].strip() #ok
technical_config['License'] = info_dict['eoa_license'].split("/")[4] #ok

general_config['BriefDescription'] = info_dict['eoa_brief_desc'] #ok
if info_dict['eoa_submitters'] is not None:
Expand Down

0 comments on commit f0f2805

Please sign in to comment.