Fix router functions check

When the router checks whether the requested route matches a function in the
functions list, it does not strip the extension, causing failures for URLs with extensions.
This change strips the extension before comparing to the list of functions.
This commit is contained in:
abastardi
2017-01-13 15:52:42 -05:00
committed by GitHub
parent b2e03c9dee
commit bd526452a8

View File

@@ -1040,7 +1040,7 @@ class MapUrlIn(object):
else:
default_function = self.router.default_function # str or None
default_function = self.domain_function or default_function
if not arg0 or functions and arg0 not in functions:
if not arg0 or functions and arg0.split('.')[0] not in functions:
self.function = default_function or ""
self.pop_arg_if(arg0 and self.function == arg0)
else: