Don't set batch input file on creation, if no file exists

This commit is contained in:
Lance Edgar 2017-09-23 13:32:12 -05:00
parent e1384c2ab1
commit 3bcec30a4c

View file

@ -262,6 +262,7 @@ class BatchMasterView(MasterView):
filename = getattr(batch, 'filename', None)
if filename:
path = os.path.join(self.upload_dir, filename)
if os.path.exists(path):
self.handler.set_input_file(batch, path)
os.remove(path)