From 58e621c4853a24fa2e87a06616286c64ef38dfa8 Mon Sep 17 00:00:00 2001 From: zsloan Date: Sat, 29 Aug 2020 13:24:53 -0500 Subject: Fixed issue with exporting traits from multiple different groups from the collection page (the filename wasn't being set) * wqflask/wqflask/views.py - Set filename to "collection_(datetime)" in export_traits_csv because it wasn't being set before --- wqflask/wqflask/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index dde22bf7..a898de43 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -417,6 +417,9 @@ def export_traits_csv(): file_list = export_traits.export_search_results_csv(request.form) if len(file_list) > 1: + now = datetime.datetime.now() + time_str = now.strftime('%H:%M_%d%B%Y') + filename = "collection_{}".format(time_str) memory_file = StringIO.StringIO() with ZipFile(memory_file, mode='w', compression=ZIP_DEFLATED) as zf: for the_file in file_list: @@ -924,8 +927,6 @@ def browser_inputs(): return flask.jsonify(file_contents) - - ########################################################################## def json_default_handler(obj): -- cgit v1.2.3