diff --git a/neluser/views.py b/neluser/views.py index e67f324..75068b2 100644 --- a/neluser/views.py +++ b/neluser/views.py @@ -14,6 +14,7 @@ from django.utils.encoding import force_bytes from django.http import HttpResponse, Http404 from django.conf import settings from django.urls import reverse_lazy +from nsfw.views import is_nsfw_allowed from .forms import RegistrationForm, ChangePasswordForm, DeleteAccountForm from .models import NelUser @@ -27,7 +28,7 @@ def settings_default(request): @login_required def set_nsfw(request): ctx = { - 'nsfw_allowed': request.user.nsfw_allowed, + 'nsfw_allowed': is_nsfw_allowed(request), 'current_url': reverse_lazy('set_nsfw'), 'tab': 'preferences', 'active_block': 'nsfw_filter'