Skip to content

Commit

Permalink
Fix DOI commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Aug 5, 2024
1 parent 18738d4 commit 883a4bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions isimip_publisher/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,15 @@ def insert_doi():
database.update_search(session, path)

session.commit()
session.close()

if not settings.SKIP_REGISTRATION and dois.confirm_upload():
dois.upload_doi(resource, settings.ISIMIP_DATA_URL,
settings.DATACITE_USERNAME, settings.DATACITE_PASSWORD,
settings.DATACITE_PREFIX, settings.DATACITE_TEST_MODE)

session.close()



def update_doi():
session = database.init_database_session(settings.DATABASE)
Expand All @@ -486,13 +488,14 @@ def update_doi():
database.update_search(session, path)

session.commit()
session.close()

if not settings.SKIP_REGISTRATION and dois.confirm_upload():
dois.upload_doi(resource, settings.ISIMIP_DATA_URL,
settings.DATACITE_USERNAME, settings.DATACITE_PASSWORD,
settings.DATACITE_PREFIX, settings.DATACITE_TEST_MODE)

session.close()


def register_doi():
if dois.confirm_upload():
Expand Down

0 comments on commit 883a4bc

Please sign in to comment.