This is an automated email from the ASF dual-hosted git repository.

gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git

commit f783e5a1bbf72fabb73dc76a8dc73a16803c7eac
Author: Greg Stein <[email protected]>
AuthorDate: Sat Feb 21 02:12:30 2026 -0600

    feat: add seats attribute to STV issues from KV value
    
    Co-authored-by: aider (openrouter/x-ai/grok-code-fast-1) <[email protected]>
---
 v3/server/pages.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/v3/server/pages.py b/v3/server/pages.py
index b0775a5..151b7c4 100644
--- a/v3/server/pages.py
+++ b/v3/server/pages.py
@@ -2,7 +2,7 @@
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
 # regarding copyright ownership.  The ASF licenses this file
-# to You under the Apache License, Version 2.0 (the
+# to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
 #
@@ -272,6 +272,11 @@ async def vote_on_page(election):
     result.issues.sort(key=lambda i: (0 if i.vtype == 'stv' else 1, i.title))
     result.issue_count = len(result.issues)
 
+    # Add seats for STV issues
+    for issue in result.issues:
+        if issue.vtype == 'stv':
+            issue.seats = issue.kv.get('seats', 0)
+
     # Scan issues for types and counts
     yna_count = sum(1 for i in result.issues if i.vtype == 'yna')
     stv_count = sum(1 for i in result.issues if i.vtype == 'stv')

Reply via email to