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 3b289cd  Fix a problem with setting form defaults
3b289cd is described below

commit 3b289cd4ccf47f5db5ab38788f6196ab3bf28168
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Sep 5 15:39:45 2025 +0100

    Fix a problem with setting form defaults
---
 atr/routes/voting.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/atr/routes/voting.py b/atr/routes/voting.py
index 459d6b2..03ef940 100644
--- a/atr/routes/voting.py
+++ b/atr/routes/voting.py
@@ -279,15 +279,17 @@ async def _form(
     )
 
     # Set defaults
+    choices: forms.Choices = sorted([(recipient, recipient) for recipient in 
permitted_recipients])
     if quart.request.method == "GET":
         # Defaults for GET requests
         form.subject.data = default_subject
         form.body.data = default_body
+        # Choices and defaults for mailing list
+        forms.choices(form.mailing_list, choices, 
default=util.USER_TESTS_ADDRESS)
+    else:
+        forms.choices(form.mailing_list, choices)
     # Hidden field
     form.release_name.data = release.name
-    # Choices and defaults for mailing list
-    choices: forms.Choices = sorted([(recipient, recipient) for recipient in 
permitted_recipients])
-    forms.choices(form.mailing_list, choices, default=util.USER_TESTS_ADDRESS)
     # Description
     form.mailing_list.description = f"""\
 NOTE: The limited options above are provided for testing purposes.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to