Don't process file for new batch unless field is present
This commit is contained in:
parent
737b2e578a
commit
aded59d7ff
|
@ -129,6 +129,7 @@ class BatchMasterView3(MasterView3, BatchMasterView2):
|
|||
kwargs = self.get_batch_kwargs(batch)
|
||||
|
||||
# TODO: this needs work yet surely...
|
||||
if 'filename' in form.schema:
|
||||
filedict = kwargs.pop('filename', None)
|
||||
filepath = None
|
||||
if filedict:
|
||||
|
@ -150,6 +151,7 @@ class BatchMasterView3(MasterView3, BatchMasterView2):
|
|||
|
||||
# TODO: this needs work yet surely...
|
||||
# if batch has input data file, let handler properly establish that
|
||||
if 'filename' in form.schema:
|
||||
if filedict:
|
||||
self.handler.set_input_file(batch, filepath)
|
||||
os.remove(filepath)
|
||||
|
|
Loading…
Reference in a new issue