Fix batch file download link URL

This commit is contained in:
Lance Edgar 2018-07-03 18:25:34 -05:00
parent 6febd01e76
commit ac5a6c011b

View file

@ -1387,15 +1387,7 @@ class FileBatchMasterView(BatchMasterView):
f.set_type('filename', 'file')
else:
f.set_readonly('filename')
f.set_renderer('filename', self.render_filename)
def render_filename(self, batch, field):
filename = getattr(batch, field)
if not filename:
return ""
path = batch.filepath(self.rattail_config, filename=filename)
url = self.get_action_url('download', batch)
return self.render_file_field(path, url)
f.set_renderer('filename', self.render_downloadable_file)
class ToggleComplete(colander.MappingSchema):