Author: humbedooh
Date: Thu Feb 11 10:15:55 2016
New Revision: 1729791

URL: http://svn.apache.org/viewvc?rev=1729791&view=rev
Log:
also cue on reopen

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=1729791&r1=1729790&r2=1729791&view=diff
==============================================================================
--- steve/trunk/pysteve/www/cgi-bin/rest_admin.py (original)
+++ steve/trunk/pysteve/www/cgi-bin/rest_admin.py Thu Feb 11 10:15:55 2016
@@ -436,10 +436,12 @@ else:
                 if karma >= 4 or ('owner' in basedata and basedata['owner'] == 
whoami):
                     try:
                         election.close(electionID, reopen=ro)
+                        ehash, debug = election.getHash(electionID)
                         if ro:
+                            for email in basedata['monitors']:
+                                voter.email(email, "Monitoring update for 
election #%s: Election reopened!" % electionID, debug)
                             response.respond(200, {'message': "Election 
reopened"})
                         else:
-                            ehash, debug = election.getHash(electionID)
                             murl =  "%s/admin/tally.html?%s" % 
(config.get("general", "rooturl"), electionID)
                             for email in basedata['monitors']:
                                 voter.email(email, "Monitoring update for 
election #%s: Election closed!" % electionID, "%s\n\nFinal tally available at: 
%s" % (debug, murl))


Reply via email to