Skip to content

Commit

Permalink
Update dataverse_repository_curation_assistant_functions.py
Browse files Browse the repository at this point in the history
Fixing bug that prevented app from getting metadata of unpublished dataset versions.
  • Loading branch information
jggautier committed May 8, 2022
1 parent ab5eca8 commit d3dabdf
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -907,10 +907,13 @@ def get_metadata_values_lists(
datasetPersistentUrl = datasetMetadata['data']['persistentUrl']
datasetPid = get_canonical_pid(datasetPersistentUrl)
datasetUrl = installationUrl + '/dataset.xhtml?persistentId=' + datasetPid
if 'versionNumber' in datasetMetadata['data'][versions]:

majorVersionNumber = datasetMetadata['data'][versions]['versionNumber']
minorVersionNumber = datasetMetadata['data'][versions]['versionMinorNumber']
datasetVersionNumber = f'{majorVersionNumber}.{minorVersionNumber}'
majorVersionNumber = datasetMetadata['data'][versions]['versionNumber']
minorVersionNumber = datasetMetadata['data'][versions]['versionMinorNumber']
datasetVersionNumber = f'{majorVersionNumber}.{minorVersionNumber}'
else:
datasetVersionNumber = 'DRAFT'

for fields in datasetMetadata['data'][versions]['metadataBlocks'][metadatablockName]['fields']:
if fields['typeName'] == chosenTitleDBName:
Expand Down

0 comments on commit d3dabdf

Please sign in to comment.