taskapp/events/task.py
changeset 99 64c34c1f441f
parent 96 2881ed1c52b0
child 105 091b044a3bf4
equal deleted inserted replaced
98:cf94e35a9f99 99:64c34c1f441f
     1 from datetime import datetime
     1 from datetime import datetime
     2 from pytask.taskapp.models import Profile, Task, Comment, Credit, Claim, Map
     2 from pytask.taskapp.models import Profile, Task, Comment, Credit, Claim, Map
       
     3 from pytask.taskapp.utilities.request import create_request
     3 
     4 
     4 def publishTask(task):
     5 def publishTask(task):
     5     """ set the task status to open """
     6     """ set the task status to open """
     6 
     7 
     7     if task.sub_type == 'D':
     8     if task.sub_type == 'D':
   192 
   193 
   193 def assignCredits(task, given_by, given_to, points):
   194 def assignCredits(task, given_by, given_to, points):
   194     """ make a proper request object.
   195     """ make a proper request object.
   195     """
   196     """
   196     
   197     
   197     addCredits(task, given_by, given_to, points)
   198     create_request(sent_by=given_by, role="PY", task=task, receiving_user=given_to, pynts=points ) 
   198 
   199 
   199 def addCredits(task, given_by, given_to, points):
   200 def addCredits(task, given_by, given_to, points):
   200     """ add credit to the credits model.
   201     """ add credit to the credits model.
   201     """
   202     """
   202 
   203