aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-08-29 13:24:53 -0500
committerzsloan2020-08-29 13:24:53 -0500
commit58e621c4853a24fa2e87a06616286c64ef38dfa8 (patch)
treee9ddf35a6d461ba597425ea3efa4ad8577cd3a68
parentdbc07d3f16b7c5337747af40a4d24c2ef27d2145 (diff)
downloadgenenetwork2-58e621c4853a24fa2e87a06616286c64ef38dfa8.tar.gz
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
-rw-r--r--wqflask/wqflask/views.py5
1 files 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):