Pass query along for download results, so subclass can modify
This commit is contained in:
parent
ee961edf94
commit
59a9d2cf86
|
@ -2722,7 +2722,7 @@ class MasterView(View):
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
|
|
||||||
# generate file for download
|
# generate file for download
|
||||||
results = results.with_session(session).all()
|
results = results.with_session(session)
|
||||||
self.download_results_setup(fields, progress=progress)
|
self.download_results_setup(fields, progress=progress)
|
||||||
self.download_results_generate(session, results, path, fmt, fields,
|
self.download_results_generate(session, results, path, fmt, fields,
|
||||||
progress=progress)
|
progress=progress)
|
||||||
|
@ -2779,7 +2779,7 @@ class MasterView(View):
|
||||||
csvrow = self.download_results_coerce_csv(data, fields)
|
csvrow = self.download_results_coerce_csv(data, fields)
|
||||||
writer.writerow(csvrow)
|
writer.writerow(csvrow)
|
||||||
|
|
||||||
self.progress_loop(write, results, progress,
|
self.progress_loop(write, results.all(), progress,
|
||||||
message="Writing data to CSV file")
|
message="Writing data to CSV file")
|
||||||
csv_file.close()
|
csv_file.close()
|
||||||
|
|
||||||
|
@ -2796,7 +2796,7 @@ class MasterView(View):
|
||||||
xlrow = [row[field] for field in fields]
|
xlrow = [row[field] for field in fields]
|
||||||
xlrows.append(xlrow)
|
xlrows.append(xlrow)
|
||||||
|
|
||||||
self.progress_loop(write, results, progress,
|
self.progress_loop(write, results.all(), progress,
|
||||||
message="Collecting data for Excel")
|
message="Collecting data for Excel")
|
||||||
|
|
||||||
def finalize(x, i):
|
def finalize(x, i):
|
||||||
|
|
Loading…
Reference in a new issue