From 59a9d2cf86f4e3f9ad6a6bb2f268550055bc826d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 1 Mar 2022 12:17:06 -0600 Subject: [PATCH] Pass query along for download results, so subclass can modify --- tailbone/views/master.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tailbone/views/master.py b/tailbone/views/master.py index b4d76d80..b36f18b3 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -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):