app/soc/cron/student_proposal_mailer.py
changeset 2226 6159450c4767
parent 2223 7b8b812aa146
child 2238 71f4d7642afb
--- a/app/soc/cron/student_proposal_mailer.py	Sat Apr 18 21:26:13 2009 +0000
+++ b/app/soc/cron/student_proposal_mailer.py	Sat Apr 18 21:30:58 2009 +0000
@@ -34,9 +34,6 @@
 # amount of students to create jobs for before updating
 DEF_STUDENT_STEP_SIZE = 10
 
-# property text_data for a sendStudentProposalMail Job
-DEF_STUDENT_PROPOSAL_MAIL_TEXT_DATA_FMT = '%s/proposal_mail'
-
 
 def setupStudentProposalMailing(job_entity):
   """Job that setup jobs that will mail students if they have been accepted in
@@ -81,15 +78,12 @@
   while students:
     # for each student create a mailing job
     for student in students:
-      text_data = DEF_STUDENT_PROPOSAL_MAIL_TEXT_DATA_FMT % (
-          student.key().name())
 
-      job_query_fields['text_data'] = text_data
+      job_query_fields['key_data'] = student.key()
       mail_job = job_logic.getForFields(job_query_fields, unique=True)
 
       if not mail_job:
         # this student did not receive mail yet
-        job_fields['text_data'] = text_data
         job_fields['key_data'] = [student.key()]
         job_logic.updateOrCreateFromFields(job_fields)