Commit 453eaf3d authored by David Haynes's avatar David Haynes 🙆
Browse files

Merge branch '2.2-dev' into 103-flake8

parents d3a13d1c 21564865
Pipeline #1307 passed with stages
in 2 minutes and 56 seconds
......@@ -452,7 +452,11 @@ def redirection(request, short):
url = get_object_or_404(URL, short__iexact=short)
# Increment our clicks by one
url.clicks += 1
# Get the URL short link
doesExist = URL.objects.get(short__iexact=short)
# Checks to see if the link exists, if not we 404 the user.
if is None:
return redirect('go/404.html')
# If the user is trying to make a Go link to itself, we 404 them
if == domain + short:
return redirect('404.html')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment