ha... ha... One day I'll get good at testing

This commit is contained in:
Zergling_man 2022-03-27 20:19:48 +11:00
parent b4961d6213
commit 82f97cce0d

View File

@ -15,7 +15,7 @@ class RedirectConverter:
regex='.*'
def to_python(self,value):
try: r=Redirect.objects.get(match=value)
except Page.DoesNotExist: raise ValueError(f'No such redirect {value}')
except Redirect.DoesNotExist: raise ValueError(f'No such redirect {value}')
if not r: raise ValueError(f'No such redirect {value}')
return r
def to_url(self,value):