diff options
author | zsloan | 2021-08-04 21:10:46 +0000 |
---|---|---|
committer | zsloan | 2021-08-26 19:06:26 +0000 |
commit | 7247954e3e38a0fe117cd4e7fda1dbefa463d196 (patch) | |
tree | 7ff2f557794f2330491c6cf9191954a3c0e7a911 /wqflask | |
parent | 841664dd4ee7dff7cd9304476a60d1dc80d42a66 (diff) | |
download | genenetwork2-7247954e3e38a0fe117cd4e7fda1dbefa463d196.tar.gz |
Only store js_data if not using pair_scan (which doesn't need it) + remove unused code from the previous pair_scan implementation
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/views.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index f282504c..000d71d9 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -1132,23 +1132,15 @@ def mapping_results_page(): rendered_template = render_template("mapping_error.html") return rendered_template - template_vars.js_data = json.dumps(template_vars.js_data, - default=json_default_handler, - indent=" ") + if not template_vars.pair_scan: + template_vars.js_data = json.dumps(template_vars.js_data, + default=json_default_handler, + indent=" ") result = template_vars.__dict__ if result['pair_scan']: with Bench("Rendering template"): - img_path = result['pair_scan_filename'] - logger.info("img_path:", img_path) - initial_start_vars = request.form - logger.info("initial_start_vars:", initial_start_vars) - imgfile = open(TEMPDIR + img_path, 'rb') - imgdata = imgfile.read() - imgB64 = base64.b64encode(imgdata) - bytesarray = array.array('B', imgB64) - result['pair_scan_array'] = bytesarray rendered_template = render_template( "pair_scan_results.html", **result) else: |