diff options
Diffstat (limited to 'pyblackbird_cc/resources/views.py')
-rw-r--r-- | pyblackbird_cc/resources/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyblackbird_cc/resources/views.py b/pyblackbird_cc/resources/views.py index 5922151..eecb7cd 100644 --- a/pyblackbird_cc/resources/views.py +++ b/pyblackbird_cc/resources/views.py @@ -344,7 +344,7 @@ def update_resource_metadata(request, pk): # Change resource_id to pk def add_resource_pdfs(request, pk): resource = get_object_or_404(Resource, pk=pk) if request.method == "POST": - form = ResourceUpdatePDFsForm(request.POST, request.FILES) + form = ResourceUpdatePDFsForm(resource.get_absolute_url(), request.POST, request.FILES) if form.is_valid(): pdf_files = form.cleaned_data["pdf_files"] @@ -380,6 +380,6 @@ def add_resource_pdfs(request, pk): return redirect("resources:resource_detail", resource_id=resource.id) else: - form = ResourceUpdatePDFsForm(resource=pk) + form = ResourceUpdatePDFsForm(resource.get_absolute_url(), resource=pk) return render(request, "resources/update_pdfs.html", {"form": form, "resource": resource}) |