also should handle InvalidUsage exception
This commit is contained in:
parent
d86e603c07
commit
071bc23411
|
@ -353,7 +353,7 @@ class Router:
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
handler = self.get(request)[0]
|
handler = self.get(request)[0]
|
||||||
except NotFound:
|
except (NotFound, InvalidUsage):
|
||||||
return False
|
return False
|
||||||
if (hasattr(handler, 'view_class') and
|
if (hasattr(handler, 'view_class') and
|
||||||
hasattr(handler.view_class, request.method.lower())):
|
hasattr(handler.view_class, request.method.lower())):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user