From 4be04a380050b528c1fdf4d5793103d209744964 Mon Sep 17 00:00:00 2001 From: Luke Hatcher Date: Wed, 18 Jul 2012 19:22:29 -0400 Subject: [PATCH] don't allow adding documents to cancelled proposals --- symposion/proposals/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/symposion/proposals/views.py b/symposion/proposals/views.py index 8d7e499a..fd5e210c 100644 --- a/symposion/proposals/views.py +++ b/symposion/proposals/views.py @@ -282,6 +282,9 @@ def document_create(request, proposal_pk): proposal = get_object_or_404(queryset, pk=proposal_pk) proposal = ProposalBase.objects.get_subclass(pk=proposal.pk) + if proposal.cancelled: + return HttpResponseForbidden() + if request.method == "POST": form = SupportingDocumentCreateForm(request.POST, request.FILES) if form.is_valid():