Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
tlocke committed Sep 16, 2024
1 parent f56a0b8 commit 02e325e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions chellow/e/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 02e325e

Please sign in to comment.