From 32615345536805c77a957c8678979992cece611c Mon Sep 17 00:00:00 2001 From: ekmpa Date: Mon, 12 Oct 2026 10:32:47 -0400 Subject: [PATCH] Update member form: only Name is required "Auto Update Publications" is now optional on the update form; left blank, the member's existing setting is kept (new members still default to False). A form with only Name + Avatar now changes just the avatar. Co-Authored-By: Claude Opus 5.5 --- .github/ISSUE_TEMPLATE/update-member.yml | 4 ++-- src/python/add_update_member.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/update-member.yml b/.github/ISSUE_TEMPLATE/update-member.yml index 0612f5225..989c9c16b 100644 --- a/.github/ISSUE_TEMPLATE/update-member.yml +++ b/.github/ISSUE_TEMPLATE/update-member.yml @@ -71,13 +71,13 @@ body: id: auto_update_publications attributes: label: "Auto Update Publications" - description: Do you want your publications to be auto-updated? + description: Do you want your publications to be auto-updated? Leave blank to keep the current setting. multiple: false options: - "False" - "True" validations: - required: True + required: false - type: dropdown id: current_role-type diff --git a/src/python/add_update_member.py b/src/python/add_update_member.py index af033fbec..adf7757e4 100644 --- a/src/python/add_update_member.py +++ b/src/python/add_update_member.py @@ -66,10 +66,11 @@ def process_role_data(parsed: Dict, prefix: str = "") -> Optional[Dict]: def format_parsed_content(parsed: Dict) -> Dict: """Format the parsed content into the new structure.""" - formatted = { - "name": parsed["name"], - "auto_update_publications": parsed.get("auto_update_publications", "False") == "True" - } + formatted = {"name": parsed["name"]} + + # Left blank on an update, the existing setting is kept; new members default to False + if is_filled(parsed.get("auto_update_publications")): + formatted["auto_update_publications"] = parsed["auto_update_publications"] == "True" # Process current role current_role = process_role_data(parsed, "current_role_") @@ -173,6 +174,7 @@ def main(parsed: Dict, action: str, site_data_dir: str = "_data/", image_dir: st name_to_username = {authors[username]["name"]: username for username in authors} if action == "Add member" and profile["name"] not in name_to_username: + profile.setdefault("auto_update_publications", False) username = profile["name"] if username in authors: n = 2