taskapp/utilities/request.py
changeset 80 8917b190c4c4
parent 78 c5bcafccc135
child 81 cade14d25a58
--- a/taskapp/utilities/request.py	Wed Feb 24 16:52:03 2010 +0530
+++ b/taskapp/utilities/request.py	Wed Feb 24 17:11:59 2010 +0530
@@ -16,9 +16,9 @@
     req.save()
     req.to = to
     req.role = role
-    if task is not None:
+    if task:
         req.task = task
-    if assigned_user is not None:
+    if assigned_user:
         req.assigned_user = assigned_user
     req.save()
 
@@ -33,7 +33,7 @@
         request = Request.objects.get(id = request_id)
     except Request.DoesNotExist:
         return False #No such request exist
-    if request.replied is not True:
+    if not request.replied:
         request.reply = reply
         request.replied = True
         request.read = True