From 3371717cc040e6e0e8dc19bb30e553d848e94fcd Mon Sep 17 00:00:00 2001 From: Tony Locke Date: Tue, 22 Oct 2024 16:16:24 +0100 Subject: [PATCH] i --- chellow/e/views.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/chellow/e/views.py b/chellow/e/views.py index 790b7f958..a266c89a1 100644 --- a/chellow/e/views.py +++ b/chellow/e/views.py @@ -68,7 +68,6 @@ ReadType, RegisterRead, Report, - Scenario, Site, SiteEra, Snag, @@ -80,7 +79,6 @@ ) from chellow.utils import ( HH, - c_months_c, c_months_u, csv_make_val, ct_datetime, @@ -728,9 +726,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 @@ -2822,9 +2820,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 @@ -5028,9 +5026,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 @@ -6023,9 +6021,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)