This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new bf4689e Fix a problem with deleting files
bf4689e is described below
commit bf4689e3b55fbeaa67b32f082a2ec0e9e8b451b8
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Sep 15 16:02:33 2025 +0100
Fix a problem with deleting files
---
atr/routes/draft.py | 4 ++++
atr/templates/macros/dialog.html | 1 +
2 files changed, 5 insertions(+)
diff --git a/atr/routes/draft.py b/atr/routes/draft.py
index dec59d3..001d31e 100644
--- a/atr/routes/draft.py
+++ b/atr/routes/draft.py
@@ -124,6 +124,10 @@ async def delete_file(session: routes.CommitterSession,
project_name: str, versi
form = await DeleteFileForm.create_form(data=await quart.request.form)
if not await form.validate_on_submit():
+ error_summary = []
+ for key, value in form.errors.items():
+ error_summary.append(f"{key}: {value}")
+ await quart.flash("; ".join(error_summary), "error")
return await session.redirect(compose.selected,
project_name=project_name, version_name=version_name)
rel_path_to_delete = pathlib.Path(str(form.file_path.data))
diff --git a/atr/templates/macros/dialog.html b/atr/templates/macros/dialog.html
index 286e832..db40510 100644
--- a/atr/templates/macros/dialog.html
+++ b/atr/templates/macros/dialog.html
@@ -69,6 +69,7 @@
</p>
<form method="post" action="{{ action }}">
{{ form.hidden_tag() }}
+ <input type="hidden" name="{{ field_name }}" value="{{ id }}" />
{{ form.submit(class_="btn btn-danger", id_="delete-button-" +
element_id) }}
</form>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]