equal
deleted
inserted
replaced
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 |