pytask/taskapp/views.py
changeset 357 ec7f2f4256f5
parent 356 f88135529c74
child 360 b4988ede9e3d
equal deleted inserted replaced
356:f88135529c74 357:ec7f2f4256f5
   165     is_reviewer = True if user in reviewers else False
   165     is_reviewer = True if user in reviewers else False
   166     has_claimed = True if user in claimed_users else False
   166     has_claimed = True if user in claimed_users else False
   167 
   167 
   168     task_claimable = True if task.status in ["OP", "WR"] else False
   168     task_claimable = True if task.status in ["OP", "WR"] else False
   169     can_claim = True if task_claimable and ( not has_claimed )\
   169     can_claim = True if task_claimable and ( not has_claimed )\
   170                         and ( not is_reviewer ) else False
   170                         and ( not is_reviewer ) and (not is_creator ) \
       
   171                         else False
   171 
   172 
   172     old_claims = task.claims.all()
   173     old_claims = task.claims.all()
   173 
   174 
   174     context.update({"is_creator": is_creator,
   175     context.update({"is_creator": is_creator,
   175                     "task_claimable": task_claimable,
   176                     "task_claimable": task_claimable,