Automatically retry index with trailing slash
I wasn't too clear about this originally but I'd like the URLs in the orbit to come with a trailing slash. In case someone left it off, we'll try adding it back.
This commit is contained in:
parent
00aa59a067
commit
d31ff6a0ea
|
@ -18,6 +18,11 @@ except:
|
|||
|
||||
CURRENT_URL = urllib.parse.unquote(os.environ.get("QUERY_STRING",MAIN_PAGE))
|
||||
CURRENT_URL_PARSED = urllib.parse.urlparse(CURRENT_URL)
|
||||
try:
|
||||
CURRENT_URL_INDEX = URLS.index(CURRENT_URL)
|
||||
except:
|
||||
# I wasn't clear about trailing slashes, maybe add one on?
|
||||
CURRENT_URL += "/"
|
||||
try:
|
||||
CURRENT_URL_INDEX = URLS.index(CURRENT_URL)
|
||||
except:
|
||||
|
|
Loading…
Reference in New Issue