Handle a null suffix properly.
- Legacy-Id: 417
This commit is contained in:
parent
16b718c917
commit
9594e1ec82
|
@ -16,10 +16,14 @@ def redirect(request, path="", script=""):
|
|||
try:
|
||||
cmd = redir.commands.all().get(command=request.REQUEST['command'])
|
||||
if cmd.url:
|
||||
rest = cmd.url + "/" + cmd.suffix.rest
|
||||
rest = cmd.url + "/"
|
||||
else:
|
||||
rest = cmd.suffix.rest
|
||||
remove = cmd.suffix.remove
|
||||
rest = ""
|
||||
if cmd.suffix:
|
||||
rest = rest + cmd.suffix.rest
|
||||
remove = cmd.suffix.remove
|
||||
else:
|
||||
remove = ""
|
||||
except Command.DoesNotExist:
|
||||
pass # it's ok, there's no more-specific request.
|
||||
except KeyError:
|
||||
|
|
Loading…
Reference in a new issue