Removed logic for the exception of start > end. This didn't add anything to UX so will need to find a better way of doing this. Ultimately, saying that there are no events available IS the correct response.

This commit is contained in:
tomtom5152
2015-03-05 15:11:23 +00:00
parent 3876318fe5
commit d6bcc2f5dd

View File

@@ -9,7 +9,7 @@ from django.shortcuts import get_object_or_404
from django.template import Context, RequestContext
from django.template.loader import get_template
from django.conf import settings
from django.http import HttpResponse, Http404
from django.http import HttpResponse, HttpResponseBadRequest
from django.db.models import Q
from z3c.rml import rml2pdf
from PyPDF2 import PdfFileMerger, PdfFileReader
@@ -129,8 +129,6 @@ class EventArchive(generic.ArchiveIndexView):
if end != "":
filter = Q(start_date__lte=end)
if start:
if start > end:
raise Http404("The selected start date is after the end date")
if filter:
filter = filter & Q(start_date__gte=start)
else: