Commit 94b93b57968536f5823ba47202e29bdc5ad0c4d5

Authored by Andrew Buss
1 parent 7b4e8b793c
Exists in master

Right and I also made that a property hurr

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

flashcards/views.py View file @ 94b93b5
... ... @@ -50,7 +50,7 @@
50 50 section = self.get_object()
51 51 if request.user.sections.filter(pk=section.pk).exists():
52 52 raise ValidationError("You are already in this section.")
53   - if section.is_whitelisted() and not section.is_user_on_whitelist(request.user):
  53 + if section.is_whitelisted and not section.is_user_on_whitelist(request.user):
54 54 raise PermissionDenied("You must be on the whitelist to add this section.")
55 55 request.user.sections.add(section)
56 56 return Response(status=HTTP_204_NO_CONTENT)