Author: humbedooh
Date: Thu Mar 19 17:27:38 2020
New Revision: 1875431
URL: http://svn.apache.org/viewvc?rev=1875431&view=rev
Log:
skip blank entries on STV creation
Modified:
steve/trunk/pysteve/www/cgi-bin/rest_admin.py
Modified: steve/trunk/pysteve/www/cgi-bin/rest_admin.py
URL:
http://svn.apache.org/viewvc/steve/trunk/pysteve/www/cgi-bin/rest_admin.py?rev=1875431&r1=1875430&r2=1875431&view=diff
==============================================================================
--- steve/trunk/pysteve/www/cgi-bin/rest_admin.py (original)
+++ steve/trunk/pysteve/www/cgi-bin/rest_admin.py Thu Mar 19 17:27:38 2020
@@ -153,7 +153,7 @@ else:
except:
c =
form.getvalue('candidates').split("\n")
z = 0
- for entry in c:
+ for entry in [x for x in c if x and
x.strip()]: # Skip blank entries
candidates.append({'name':
entry.strip(), 'statement': s[z] if len(s) > z else ""})
z += 1
# HACK: If candidate parsing is
outsourced, let's do that instead (primarily for COP)