fixed a bug in edit_task view.
authornishanth
Tue, 02 Mar 2010 16:20:28 +0530
changeset 180 972745147e3f
parent 179 8d1fdb148c27
child 181 be8ad7e26176
fixed a bug in edit_task view.
taskapp/views/task.py
--- a/taskapp/views/task.py	Tue Mar 02 16:04:41 2010 +0530
+++ b/taskapp/views/task.py	Tue Mar 02 16:20:28 2010 +0530
@@ -152,7 +152,7 @@
         else:
             return show_msg(user, 'You are not authorised to create a task.')
     else:
-        return show_msg(user, 'You are not authorised to create a task.')
+        return show_msg(user, 'You are not authorised to create a task.', "/", "home page")
         
 def add_mentor(request, tid):
     """ check if the current user has the rights to edit the task and add him.
@@ -521,7 +521,8 @@
     and then give the user fields accordingly.
     """
     
-    task = Task.objects.get(id=tid)
+    task = getTask(tid)
+
     task_url = "/task/view/tid=%s"%tid
     user = get_user(request.user) if request.user.is_authenticated() else request.user