don't allow adding documents to cancelled proposals
This commit is contained in:
parent
07e98036b7
commit
4be04a3800
1 changed files with 3 additions and 0 deletions
|
@ -282,6 +282,9 @@ def document_create(request, proposal_pk):
|
||||||
proposal = get_object_or_404(queryset, pk=proposal_pk)
|
proposal = get_object_or_404(queryset, pk=proposal_pk)
|
||||||
proposal = ProposalBase.objects.get_subclass(pk=proposal.pk)
|
proposal = ProposalBase.objects.get_subclass(pk=proposal.pk)
|
||||||
|
|
||||||
|
if proposal.cancelled:
|
||||||
|
return HttpResponseForbidden()
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
form = SupportingDocumentCreateForm(request.POST, request.FILES)
|
form = SupportingDocumentCreateForm(request.POST, request.FILES)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
|
|
Loading…
Reference in a new issue