mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix missing seek call in export task
This commit is contained in:
@@ -66,6 +66,7 @@ def export(self, event: Event, fileid: str, provider: str, form_data: Dict[str,
|
||||
with tempfile.TemporaryFile() as f:
|
||||
if 'output_file' in inspect.signature(ex.render).parameters:
|
||||
d = ex.render(form_data, output_file=f)
|
||||
f.seek(0)
|
||||
if d is None:
|
||||
raise ExportError(
|
||||
gettext('Your export did not contain any data.')
|
||||
@@ -143,6 +144,7 @@ def multiexport(self, organizer: Organizer, user: User, device: int, token: int,
|
||||
with tempfile.TemporaryFile() as f:
|
||||
if 'output_file' in inspect.signature(ex.render).parameters:
|
||||
d = ex.render(form_data, output_file=f)
|
||||
f.seek(0)
|
||||
if d is None:
|
||||
raise ExportError(
|
||||
gettext('Your export did not contain any data.')
|
||||
|
||||
Reference in New Issue
Block a user