# HG changeset patch # User anoop # Date 1267011719 -19800 # Node ID 8917b190c4c44618c85cc98ebbf4f7839fc54b08 # Parent fd6b28204fb19998e49ffdf90fde14645fbe03e3 added attribute pynts to request model. diff -r fd6b28204fb1 -r 8917b190c4c4 taskapp/models.py --- a/taskapp/models.py Wed Feb 24 16:52:03 2010 +0530 +++ b/taskapp/models.py Wed Feb 24 17:11:59 2010 +0530 @@ -141,6 +141,7 @@ replied = models.BooleanField(default = False) task = models.ForeignKey(Task,related_name = "%(class)s_task", blank = True, null = True) assigned_user = models.ForeignKey(User, related_name = "%(class)s_assigned_user", blank = True, null = True) + pynts = models.PositiveIntegerField(default=0) class Notification(models.Model): diff -r fd6b28204fb1 -r 8917b190c4c4 taskapp/utilities/request.py --- 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