Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
tlocke committed Oct 22, 2024
1 parent 67dd5eb commit 3371717
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions chellow/e/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
ReadType,
RegisterRead,
Report,
Scenario,
Site,
SiteEra,
Snag,
Expand All @@ -80,7 +79,6 @@
)
from chellow.utils import (
HH,
c_months_c,
c_months_u,
csv_make_val,
ct_datetime,
Expand Down Expand Up @@ -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

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

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

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

0 comments on commit 3371717

Please sign in to comment.