also should handle InvalidUsage exception
This commit is contained in:
parent
24b946e850
commit
cf30ed745c
|
@ -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