Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion dojo/url/ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.core.exceptions import PermissionDenied, ValidationError
from django.core.management import call_command
from django.db import DEFAULT_DB_ALIAS
from django.http import HttpRequest, HttpResponseRedirect
from django.http import Http404, HttpRequest, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.utils import timezone
Expand Down Expand Up @@ -100,6 +100,14 @@ def process_endpoint_view(request: HttpRequest, location_id: int, *, host_view=F

"""
location = get_object_or_404(Location, id=location_id)
if location.location_type != URL.get_location_type():
messages.add_message(
request,
messages.ERROR,
"Viewing this object is only available in the Pro new UI.",
Comment thread
Maffooch marked this conversation as resolved.
Outdated
extra_tags="alert-danger",
)
raise Http404
host = location.url.host
locations = None
metadata = None
Expand Down