Fixed the Student update to properly find its own URL.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 16 Sep 2009 20:09:13 +0200
changeset 2932 666d31bd43bd
parent 2931 e89022c0657f
child 2933 c978f8353467
Fixed the Student update to properly find its own URL. Also style fix in start_update module.
app/soc/tasks/updates/start_update.py
app/soc/tasks/updates/student_school_type.py
--- a/app/soc/tasks/updates/start_update.py	Wed Sep 16 13:38:18 2009 +0200
+++ b/app/soc/tasks/updates/start_update.py	Wed Sep 16 20:09:13 2009 +0200
@@ -125,7 +125,8 @@
     else:
       template = 'soc/tasks/run_update.html'
       context['option'] = option
-      context['success'] = option['starter'](request, self._getRunUpdateURL(option_name))
+      context['success'] = option['starter'](request,
+                                             self._getRunUpdateURL(option_name))
 
     content = loader.render_to_string(template, dictionary=context)
     return http.HttpResponse(content)
--- a/app/soc/tasks/updates/student_school_type.py	Wed Sep 16 13:38:18 2009 +0200
+++ b/app/soc/tasks/updates/student_school_type.py	Wed Sep 16 20:09:13 2009 +0200
@@ -104,7 +104,8 @@
     # pass along these params as POST to the new task
     task_params = {'start_key': new_start}
 
-    new_task = taskqueue.Task(params=task_params, url=request['PATH_INFO'])
+    new_task = taskqueue.Task(params=task_params,
+                              url=request.META['PATH_INFO'])
     new_task.add()
 
   # task completed, return OK