Skip to content

Commit

Permalink
Put agent properties in same order as when stored to avoid mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
kwahlin committed Sep 14, 2023
1 parent d85bebf commit 56ce05b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion librisworks/scripts/add-missing-contribution-data.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ boolean addRemainingContributionsFromRespStatement(List<Map> contribution, Map c
def newContribution =
[
'@type': 'Contribution',
'agent': ['@type': 'Person', 'name': normalizedNames[name]],
'agent': ['name': normalizedNames[name], '@type': 'Person'],
'role' : translatorEditor
]

Expand Down Expand Up @@ -472,6 +472,9 @@ boolean tryAddMissingTranslationOf(Map work, List<Map> contribution, String id)

for (String translator : translators) {
def roleToIds = agentToRolesToIds[translator]

if (!roleToIds) continue

def inClusterSameTranslator = roleToIds[trl].intersect(idToCluster[id])
def origWorks = inClusterSameTranslator.findResults { idToTranslationOf[it] }

Expand Down

0 comments on commit 56ce05b

Please sign in to comment.