You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by hu...@apache.org on 2015/03/22 16:53:33 UTC
svn commit: r1668394 - /steve/trunk/pytest/www/cgi-bin/rest_admin.py
Author: humbedooh
Date: Sun Mar 22 15:53:33 2015
New Revision: 1668394
URL: http://svn.apache.org/r1668394
Log:
harmonize storage of seconds
Modified:
steve/trunk/pytest/www/cgi-bin/rest_admin.py
Modified: steve/trunk/pytest/www/cgi-bin/rest_admin.py
URL: http://svn.apache.org/viewvc/steve/trunk/pytest/www/cgi-bin/rest_admin.py?rev=1668394&r1=1668393&r2=1668394&view=diff
==============================================================================
--- steve/trunk/pytest/www/cgi-bin/rest_admin.py (original)
+++ steve/trunk/pytest/www/cgi-bin/rest_admin.py Sun Mar 22 15:53:33 2015
@@ -153,7 +153,7 @@ else:
'description': form.getvalue('description'),
'type': form.getvalue('type'),
'candidates': candidates,
- 'seconds': form.getvalue('seconds'),
+ 'seconds': form.getvalue('seconds').split("\n") if form.getvalue('seconds') else [],
'nominatedby': form.getvalue('nominatedby')
}))
f.close()
@@ -231,11 +231,13 @@ else:
for field in fields:
val = form.getvalue(field)
if val:
- if field == "candidates" or field == "seconds":
+ if field == "candidates":
xval = val.split("\n")
val = []
for entry in xval:
val.append({'name': entry})
+ if field == "seconds":
+ val = val.split("\n")
js[field] = val
with open(issuepath + ".json", "w") as f:
f.write(json.dumps(js))