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