From fe53cba90417b72ef2e27a2355ee6136f75cb5be Mon Sep 17 00:00:00 2001 From: Carl Date: Tue, 2 Jun 2026 17:14:04 +0200 Subject: [PATCH] Fixed nation id being captured too late. --- webui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webui.py b/webui.py index 48c6087..cd9db42 100644 --- a/webui.py +++ b/webui.py @@ -146,7 +146,9 @@ def create_ai_table(era, table_container, ai_slots): ui.select( AI_LEVELS, value="Human", - on_change=lambda e: set_ai_level(e.value, nation_id, ai_slots), + on_change=lambda e, nid=nation_id: set_ai_level( + e.value, nid, ai_slots + ), )