Commit 8ba1c3c7 authored by Julia Kaufhold's avatar Julia Kaufhold
Browse files

change requested in issue #112 on GitHub, deleting / in key.

parent c5b0f2c3
...@@ -89,7 +89,8 @@ def collectPIDsForCollection(collectionPath, configuration): ...@@ -89,7 +89,8 @@ def collectPIDsForCollection(collectionPath, configuration):
for filePath in filePathsMap.keys(): for filePath in filePathsMap.keys():
filePID = irodsu.getMetadata(filePath, "PID") filePID = irodsu.getMetadata(filePath, "PID")
if filePID : if filePID :
PIDobject = '{"key":"'+filePath+'",'+' "ePIC_PID":"'+filePID[0] +'"}' # filePath[1:] deletes leading / in a path as requested in issue #112 on GitHub
PIDobject = '{"key":"'+filePath[1:]+'",'+' "ePIC_PID":"'+filePID[0] +'"}'
PIDobjectsString = PIDobjectsString + PIDobject +',' PIDobjectsString = PIDobjectsString + PIDobject +','
forLastElemIndex = len(PIDobjectsString) - 1 #delete last comma forLastElemIndex = len(PIDobjectsString) - 1 #delete last comma
PIDobjectsString = PIDobjectsString[:forLastElemIndex] + ']' PIDobjectsString = PIDobjectsString[:forLastElemIndex] + ']'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment