Skip to content

Commit

Permalink
update accession of contextForm from metadata for migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
James Tessmer committed Oct 8, 2024
1 parent 7f2ec78 commit ab7eb47
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def upgrade():
mappings = []
for submission_metadata in session.query(SubmissionMetadata):
metadata_submission = submission_metadata.metadata_submission
context_form = metadata_submission["contextForm"]
context_form = metadata_submission.get("contextForm")

if not context_form.get("awardDoi", None) and context_form.get("datasetDoi", None):
holder = context_form["datasetDoi"]
Expand All @@ -70,7 +70,7 @@ def downgrade():
mappings = []
for submission_metadata in session.query(SubmissionMetadata):
metadata_submission = submission_metadata.metadata_submission
context_form = metadata_submission["contextForm"]
context_form = metadata_submission.get("contextForm")

if not context_form.get("datasetDoi", None) and context_form.get("awardDoi", None):
holder = context_form["awardDoi"]
Expand Down

0 comments on commit ab7eb47

Please sign in to comment.