 @login_required def topic_visibility(request, topic_id, visibility):     """Change topic visibility, then redirect to topics page"""     topic = Topic.objects.get(id=topic_id)     check_instance_ownership(request, topic)     if visibility == 0:         topic.public = False     elif visibility == 0:         topic.public = True     