Revert "Revert "[#151837054] Add new column free_sms_fragment_limit in the Services table""

This commit is contained in:
Venus Bailey
2017-10-16 16:24:34 +01:00
committed by GitHub
parent e9b76d7d75
commit 9b60d69931
8 changed files with 135 additions and 17 deletions

View File

@@ -138,6 +138,10 @@ def create_service():
errors = {'user_id': ['Missing data for required field.']}
raise InvalidRequest(errors, status_code=400)
# TODO: to be removed when front-end is updated
if 'free_sms_fragment_limit' not in data:
data['free_sms_fragment_limit'] = current_app.config['FREE_SMS_TIER_FRAGMENT_COUNT']
# validate json with marshmallow
service_schema.load(request.get_json())