Example #1
0
 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
Example #2
0
 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
Example #3
0
    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
Example #4
0
    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