From ad8e445558ef422b55f34d3d8e3c08c9fdca37de Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Wed, 26 Apr 2017 10:24:39 +0100 Subject: [PATCH] Reformatted code --- app/notifications/validators.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/notifications/validators.py b/app/notifications/validators.py index a0d7f2539..94141f2d8 100644 --- a/app/notifications/validators.py +++ b/app/notifications/validators.py @@ -14,14 +14,8 @@ def check_service_over_api_rate_limit(service, api_key): cache_key = redis.rate_limit_cache_key(service.id, api_key.key_type) rate_limit = current_app.config['API_KEY_LIMITS'][api_key.key_type]['limit'] interval = current_app.config['API_KEY_LIMITS'][api_key.key_type]['interval'] - if redis_store.exceeded_rate_limit( - cache_key, - rate_limit, - interval): - raise RateLimitError( - rate_limit, - interval, - api_key.key_type) + if redis_store.exceeded_rate_limit(cache_key, rate_limit, interval): + raise RateLimitError(interval, api_key.key_type) def check_service_over_daily_message_limit(key_type, service):