(request, uid)
return redirect('/')
Release quarantined post to the public.
Release quarantined post to the public.
Release quarantined post to the public .
def release_quar(request, uid):
    """
    Release quarantined post to the public.
    """
    post = Post.objects.filter(uid=uid).first()
    if not post:
        messages.error(request, "Post does not exist.")
        return redirect('/')

    # Bump the score by one is the user does not get quarantined again.
    # Tells the system user has gained antibodies!
    if post.author.profile.low_rep:
        post.author.profile.bump_over_threshold()

    Post.objects.filter(uid=uid).update(spam=Post.NOT_SPAM)

    return redirect('/')
def release_quar ( request , uid ) : post = Post . objects . filter ( uid = uid ) . first ( ) if not post : messages . error ( request , "Post does not exist." ) return redirect ( '/' ) # Bump the score by one is the user does not get quarantined again. # Tells the system user has gained antibodies! if post . author . profile . low_rep : post . author . profile . bump_over_threshold ( ) Post . objects . filter ( uid = uid ) . update ( spam = Post . NOT_SPAM ) return redirect ( '/' )