|
@@ -4,7 +4,10 @@ from misago.views import error403
|
|
def block_jammed(f):
|
|
def block_jammed(f):
|
|
def decorator(*args, **kwargs):
|
|
def decorator(*args, **kwargs):
|
|
request = args[0]
|
|
request = args[0]
|
|
- if not request.firewall.admin and request.jam.is_jammed():
|
|
|
|
- return error403(request, _("You have used up allowed attempts quota and we temporarily banned you from accessing this page."))
|
|
|
|
|
|
+ try:
|
|
|
|
+ if not request.firewall.admin and request.jam.is_jammed():
|
|
|
|
+ return error403(request, _("You have used up allowed attempts quota and we temporarily banned you from accessing this page."))
|
|
|
|
+ except AttributeError:
|
|
|
|
+ pass
|
|
return f(*args, **kwargs)
|
|
return f(*args, **kwargs)
|
|
return decorator
|
|
return decorator
|