def to(self, task, status): if task.status == 'DONE' and (status == 'READY' or status == 'PROGRESS'): if status == 'PROGRESS': current_user.check_progress() task.owner = current_user else: raise BadRequest
def to(self, task, status): if task.status == 'READY' and (status == 'PROGRESS' or status == 'NEW'): if status == 'PROGRESS': current_user.check_progress() if task.estimate == 0: raise NotEstimate() task.start_time = utils.now() task.owner = current_user else: raise BadRequest