Commit 3aefcf92 authored by Tom van Bussel's avatar Tom van Bussel Committed by Sébastiaan Versteeg
Browse files

Merge branch 'fix/books-403' into 'master'

Fix issue with date and 403 on books page

See merge request !691

(cherry picked from commit ac3bde0b)

3d0982da Fix issue with date and 403 on books page
parent 29ffd518
......@@ -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
Markdown is supported
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