diff --git a/geonode/documents/views.py b/geonode/documents/views.py index 127b287fd26..ca72be2f6a4 100644 --- a/geonode/documents/views.py +++ b/geonode/documents/views.py @@ -85,8 +85,6 @@ def document_link(request, docid): def document_embed(request, docid): - from django.http.response import HttpResponseRedirect - document = get_object_or_404(Document, pk=docid) if not request.user.has_perm("base.download_resourcebase", obj=document.get_self_resource()): @@ -106,8 +104,6 @@ def document_embed(request, docid): "resource": document.get_self_resource(), } return render(request, "documents/document_embed.html", context_dict) - if document.doc_url: - return HttpResponseRedirect(document.doc_url) else: context_dict = { "document_link": reverse("document_link", args=(document.id,)),