Skip to content
Snippets Groups Projects
Commit 70fa5977 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

Merge branch 'master' of sissource.ethz.ch:sispub/openbis into master

parents 3fccb510 179d138e
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
...@@ -55,7 +55,15 @@ def process(context, parameters): ...@@ -55,7 +55,15 @@ def process(context, parameters):
temp.mkdir() temp.mkdir()
tempPath = temp.getAbsolutePath() tempPath = temp.getAbsolutePath()
MasterDataRegistrationHelper.extractToDestination(zip_bytes, tempPath) MasterDataRegistrationHelper.extractToDestination(zip_bytes, tempPath)
if (len(temp.listFiles()) == 1):
singleFile = temp.listFiles()[0]
if (singleFile.isDirectory()):
temp = singleFile
tempPath = singleFile.getAbsolutePath()
byteArrays = MasterDataRegistrationHelper.getByteArrays(Path.of(tempPath), ".xls") byteArrays = MasterDataRegistrationHelper.getByteArrays(Path.of(tempPath), ".xls")
byteArrays.addAll(MasterDataRegistrationHelper.getByteArrays(Path.of(tempPath), ".xlsx"))
if len(byteArrays) == 0:
raise UserFailureException('No .xls or .xlsx fields found. These should be on the root folder of the zip file.')
parameters.put('xls', byteArrays) parameters.put('xls', byteArrays)
allScripts = MasterDataRegistrationHelper.getAllScripts(Path.of(tempPath)) allScripts = MasterDataRegistrationHelper.getAllScripts(Path.of(tempPath))
parameters.put('scripts', allScripts) parameters.put('scripts', allScripts)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment