Exemplo n.º 1
0
def comment(user, claim, text):
    if not can_comment(user, claim):
        raise PermissionDenied
    comment = Comment()
    comment.text = text
    comment.created_by = user
    comment.save()
    claim.comments.add(comment)
    return claim
Exemplo n.º 2
0
def comment(user, claim, text):
  if not can_comment(user, claim):
    raise PermissionDenied
  comment = Comment()
  comment.text = text
  comment.created_by = user
  comment.save()
  claim.comments.add(comment)
  return claim
Exemplo n.º 3
0
def comment(user, bounty, text):
  if not can_comment(user, bounty):
    raise PermissionDenied
  comment = Comment()
  comment.text = text
  comment.created_by = user
  comment.save()
  bounty.comments.add(comment)
  return bounty