Verified Commit 3d0982da authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix issue with date and 403 on books page

parent 0ba2af30
......@@ -3,7 +3,7 @@ import os
from datetime import datetime, date
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404, render
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
......@@ -126,6 +126,7 @@ def books(request):
if (request.member and request.member.is_authenticated and
(request.member.current_membership or
(request.member.earliest_membership and
request.member.earliest_membership.since >
request.member.earliest_membership.since >
return render(request, 'education/books.html')
return HttpResponse(status=403)
raise PermissionDenied
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment