From 94b93b57968536f5823ba47202e29bdc5ad0c4d5 Mon Sep 17 00:00:00 2001 From: Andrew Buss Date: Wed, 13 May 2015 18:11:40 -0700 Subject: [PATCH] Right and I also made that a property hurr --- flashcards/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flashcards/views.py b/flashcards/views.py index 823840c..4945206 100644 --- a/flashcards/views.py +++ b/flashcards/views.py @@ -50,7 +50,7 @@ class SectionViewSet(ReadOnlyModelViewSet): section = self.get_object() if request.user.sections.filter(pk=section.pk).exists(): raise ValidationError("You are already in this section.") - if section.is_whitelisted() and not section.is_user_on_whitelist(request.user): + if section.is_whitelisted and not section.is_user_on_whitelist(request.user): raise PermissionDenied("You must be on the whitelist to add this section.") request.user.sections.add(section) return Response(status=HTTP_204_NO_CONTENT) -- 1.9.1