diff options
author | zsloan | 2020-08-29 13:24:53 -0500 |
---|---|---|
committer | zsloan | 2020-08-29 13:24:53 -0500 |
commit | 58e621c4853a24fa2e87a06616286c64ef38dfa8 (patch) | |
tree | e9ddf35a6d461ba597425ea3efa4ad8577cd3a68 | |
parent | dbc07d3f16b7c5337747af40a4d24c2ef27d2145 (diff) | |
download | genenetwork2-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.py | 5 |
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): |