Commit b57c66b7 authored by Hiro's avatar Hiro 🏄
Browse files

Fix too many requests check

parent 5582c844
...@@ -151,13 +151,10 @@ class EmailParser(object): ...@@ -151,13 +151,10 @@ class EmailParser(object):
return request return request
def too_many_requests(self, request_id, hid, request_service, num_request, limit): def too_many_requests(self, request_id, hid, request_service, num_requests, limit):
# check limit first
num_requests = limit
if hid.hexdigest() == self.settings.get('test_hid'): if hid.hexdigest() == self.settings.get('test_hid'):
return False return False
elif num_requests[0][0] < email_requests_limit: elif num_requests[0][0] < limit:
return False return False
else: else:
return True return True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment