From 02e325e3f00c67f13d3aabd30d53cebd8acd247d Mon Sep 17 00:00:00 2001 From: Tony Locke Date: Mon, 16 Sep 2024 14:21:23 +0100 Subject: [PATCH] i --- chellow/e/views.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/chellow/e/views.py b/chellow/e/views.py index a0dcd7eb3..a190c64a0 100644 --- a/chellow/e/views.py +++ b/chellow/e/views.py @@ -724,9 +724,9 @@ def dc_batch_file_download_get(file_id): batch_file = BatchFile.get_by_id(g.sess, file_id) output = make_response(batch_file.data) - output.headers["Content-Disposition"] = ( - f'attachment; filename="{batch_file.filename}"' - ) + output.headers[ + "Content-Disposition" + ] = f'attachment; filename="{batch_file.filename}"' output.headers["Content-type"] = "application/octet-stream" return output @@ -2818,9 +2818,9 @@ def mop_batch_file_download_get(file_id): batch_file = BatchFile.get_by_id(g.sess, file_id) output = make_response(batch_file.data) - output.headers["Content-Disposition"] = ( - f'attachment; filename="{batch_file.filename}"' - ) + output.headers[ + "Content-Disposition" + ] = f'attachment; filename="{batch_file.filename}"' output.headers["Content-type"] = "application/octet-stream" return output @@ -3945,7 +3945,7 @@ def scenario_add_get(): def scenario_get(scenario_id): start_date = None finish_date = None - duration = None + duration = 1 scenario = Scenario.get_by_id(g.sess, scenario_id) props = scenario.props @@ -5161,9 +5161,9 @@ def supplier_batch_file_download_get(file_id): batch_file = BatchFile.get_by_id(g.sess, file_id) output = make_response(batch_file.data) - output.headers["Content-Disposition"] = ( - f'attachment; filename="{batch_file.filename}"' - ) + output.headers[ + "Content-Disposition" + ] = f'attachment; filename="{batch_file.filename}"' output.headers["Content-type"] = "application/octet-stream" return output @@ -6156,9 +6156,9 @@ def supply_note_edit_delete(supply_id, index): supply.note = dumps(supply_note) g.sess.commit() res = make_response() - res.headers["HX-Redirect"] = ( - f"{chellow.utils.url_root}/e/supplies/{supply_id}/notes" - ) + res.headers[ + "HX-Redirect" + ] = f"{chellow.utils.url_root}/e/supplies/{supply_id}/notes" return res except BadRequest as e: flash(e.description)