Pass query along for download results, so subclass can modify

This commit is contained in:
Lance Edgar 2022-03-01 12:17:06 -06:00
parent ee961edf94
commit 59a9d2cf86

View file

@ -2722,7 +2722,7 @@ class MasterView(View):
os.remove(path)
# 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_generate(session, results, path, fmt, fields,
progress=progress)
@ -2779,7 +2779,7 @@ class MasterView(View):
csvrow = self.download_results_coerce_csv(data, fields)
writer.writerow(csvrow)
self.progress_loop(write, results, progress,
self.progress_loop(write, results.all(), progress,
message="Writing data to CSV file")
csv_file.close()
@ -2796,7 +2796,7 @@ class MasterView(View):
xlrow = [row[field] for field in fields]
xlrows.append(xlrow)
self.progress_loop(write, results, progress,
self.progress_loop(write, results.all(), progress,
message="Collecting data for Excel")
def finalize(x, i):