Skip to content

Commit

Permalink
Refs #8354 - Don't include version number if "main" DOI.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterParker committed Nov 11, 2013
1 parent be1e475 commit db01998
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Code/Tools/DOI/doi.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def build_xml_form(doi, relationships, creator_name_list, version_str):
# "The version number of the resource." Suggested practice is to "register
# a new identifier for a major version change." We'll be ignoring this
# as we're having a new DOI for every major/minor/patch release.
ET.SubElement(root, 'version').text = version_str
if version_str:
ET.SubElement(root, 'version').text = version_str

# "Identifiers of related resources. These must be globally unique
# identifiers."
Expand Down Expand Up @@ -383,7 +384,7 @@ def run(options):
# In the case of the main DOI we need to add the whitelisted names too.
creator_name_list = sorted(set(creator_name_list + authors.whitelist))

xml_form = build_xml_form(doi, {}, creator_name_list, version_str)
xml_form = build_xml_form(doi, {}, creator_name_list, None)

create_or_update_metadata(xml_form, server_url_base, doi, options)
create_or_update_doi(server_url_base, doi, destination, options)
Expand Down

0 comments on commit db01998

Please sign in to comment.