From 8a4e8bd3f66262b2c0d9c2351cdd30489a6a9e6d Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Wed, 9 Mar 2016 14:22:35 +0000 Subject: [PATCH] Default service limit reduced to 50 --- app/main/dao/services_dao.py | 6 ++---- config.py | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/main/dao/services_dao.py b/app/main/dao/services_dao.py index 77f6610dc..4104b0ff4 100644 --- a/app/main/dao/services_dao.py +++ b/app/main/dao/services_dao.py @@ -1,14 +1,12 @@ -from flask import url_for, abort +from flask import url_for, abort, current_app from app import notifications_api_client from app.utils import BrowsableItem from notifications_python_client.errors import HTTPError def insert_new_service(service_name, user_id): - # Add a service with default attributes - # Should we try and handle exception here resp = notifications_api_client.create_service( - service_name, False, 1000, True, user_id) + service_name, False, current_app.config['DEFAULT_SERVICE_LIMIT'], True, user_id) return resp['data']['id'] diff --git a/config.py b/config.py index af641a7b7..ef8ced69b 100644 --- a/config.py +++ b/config.py @@ -44,6 +44,8 @@ class Config(object): DANGEROUS_SALT = 'itsdangeroussalt' TOKEN_MAX_AGE_SECONDS = 3600 + DEFAULT_SERVICE_LIMIT = 50 + MAX_CONTENT_LENGTH = 10 * 1024 * 1024 # 10mb UPLOAD_FOLDER = '/tmp'